Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-08-05 04:06:53 +0000
committerrescobar2010-08-05 04:06:53 +0000
commit1e2a1b6b12455bb9016d0706a507629250534796 (patch)
tree7f6b78c950e76044e983aff15d67ab4716e505e5 /plugins/org.eclipse.osee.framework.access
parent3eada4adc703900e741249fab12d4b5ffbfd7a73 (diff)
downloadorg.eclipse.osee-1e2a1b6b12455bb9016d0706a507629250534796.tar.gz
org.eclipse.osee-1e2a1b6b12455bb9016d0706a507629250534796.tar.xz
org.eclipse.osee-1e2a1b6b12455bb9016d0706a507629250534796.zip
"Team Workflow" - YGHW1 - "Block changes to requirements unless done under an appropriate action."
Diffstat (limited to 'plugins/org.eclipse.osee.framework.access')
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/ConfigurationManagementProviderImpl.java28
-rw-r--r--plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/DefaultConfigurationManagement.java34
2 files changed, 57 insertions, 5 deletions
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/ConfigurationManagementProviderImpl.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/ConfigurationManagementProviderImpl.java
index dfe1f01f83d..c934a1a3d89 100644
--- a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/ConfigurationManagementProviderImpl.java
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/ConfigurationManagementProviderImpl.java
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
package org.eclipse.osee.framework.access.internal.cm;
import java.util.Collection;
@@ -7,12 +17,17 @@ import org.eclipse.osee.framework.core.services.ConfigurationManagement;
import org.eclipse.osee.framework.core.services.ConfigurationManagementProvider;
import org.eclipse.osee.framework.core.services.HasConfigurationManagement;
+/**
+ * @author Roberto E. Escobar
+ */
public class ConfigurationManagementProviderImpl implements ConfigurationManagementProvider {
private final Collection<ConfigurationManagement> cmServices;
+ private final ConfigurationManagement defaultCM;
- public ConfigurationManagementProviderImpl(Collection<ConfigurationManagement> cmServices) {
+ public ConfigurationManagementProviderImpl(ConfigurationManagement defaultCM, Collection<ConfigurationManagement> cmServices) {
this.cmServices = cmServices;
+ this.defaultCM = defaultCM;
}
@Override
@@ -23,15 +38,18 @@ public class ConfigurationManagementProviderImpl implements ConfigurationManagem
cmToReturn = cmContainer.getCM();
} else {
for (ConfigurationManagement cmService : cmServices) {
- if (cmService.isApplicable(userArtifact, object)) {
- cmToReturn = cmService;
- break;
+ if (!cmService.equals(defaultCM)) {
+ if (cmService.isApplicable(userArtifact, object)) {
+ cmToReturn = cmService;
+ break;
+ }
}
}
if (cmToReturn == null) {
- cmToReturn = null; //TODO: provide Default
+ cmToReturn = defaultCM;
}
}
return cmToReturn;
}
+
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/DefaultConfigurationManagement.java b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/DefaultConfigurationManagement.java
new file mode 100644
index 00000000000..b4b2a74ddc3
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.access/src/org/eclipse/osee/framework/access/internal/cm/DefaultConfigurationManagement.java
@@ -0,0 +1,34 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.access.internal.cm;
+
+import org.eclipse.osee.framework.core.data.AccessContextId;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.model.IBasicArtifact;
+import org.eclipse.osee.framework.core.services.ConfigurationManagement;
+
+/**
+ * @author Roberto E. Escobar
+ */
+public final class DefaultConfigurationManagement implements ConfigurationManagement {
+
+ private static final AccessContextId DEFAULT_SYSTEM_CONTEXT = null;
+
+ @Override
+ public boolean isApplicable(IBasicArtifact<?> userArtifact, Object object) {
+ return true;
+ }
+
+ @Override
+ public AccessContextId getContextId(IBasicArtifact<?> userArtifact, Object itemToCheck) throws OseeCoreException {
+ return DEFAULT_SYSTEM_CONTEXT;
+ }
+} \ No newline at end of file

Back to the top