Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-08-05 01:46:46 +0000
committerrescobar2010-08-05 01:46:46 +0000
commitf21c3ec19a963e1d794924a00690f43588014f4b (patch)
treefa2110ff47a19361629a386e2734faf028bac47e /plugins/org.eclipse.osee.framework.core.dsl.integration
parent0a15e32ada695990f9ee69c7c8da1809e0e87e97 (diff)
downloadorg.eclipse.osee-f21c3ec19a963e1d794924a00690f43588014f4b.tar.gz
org.eclipse.osee-f21c3ec19a963e1d794924a00690f43588014f4b.tar.xz
org.eclipse.osee-f21c3ec19a963e1d794924a00690f43588014f4b.zip
"Team Workflow" - YGHW1 - "Block changes to requirements unless done under an appropriate action."
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core.dsl.integration')
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/AccessModelInterpreterImpl.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/AccessModelInterpreterImpl.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/AccessModelInterpreterImpl.java
index 5b677667193..7919401f6e8 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/AccessModelInterpreterImpl.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/internal/AccessModelInterpreterImpl.java
@@ -23,6 +23,7 @@ import org.eclipse.osee.framework.core.dsl.oseeDsl.ObjectRestriction;
import org.eclipse.osee.framework.core.dsl.oseeDsl.XArtifactRef;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.core.model.access.AccessDetailCollector;
+import org.eclipse.osee.framework.core.util.Conditions;
/**
* @author Roberto E. Escobar
@@ -41,7 +42,9 @@ public class AccessModelInterpreterImpl implements AccessModelInterpreter {
}
@Override
- public AccessContext getContext(Collection<AccessContext> contexts, AccessContextId contextId) {
+ public AccessContext getContext(Collection<AccessContext> contexts, AccessContextId contextId) throws OseeCoreException {
+ Conditions.checkNotNull(contexts, "accessContext collection");
+ Conditions.checkNotNull(contextId, "accessContextId");
AccessContext toReturn = null;
for (AccessContext accessContext : contexts) {
if (contextId.getGuid().equals(accessContext.getGuid())) {
@@ -53,8 +56,15 @@ public class AccessModelInterpreterImpl implements AccessModelInterpreter {
@Override
public void computeAccessDetails(AccessDetailCollector collector, AccessContext context, Object objectToCheck) throws OseeCoreException {
+ Conditions.checkNotNull(collector, "accessDetailCollector");
+ Conditions.checkNotNull(context, "accessContext");
+ Conditions.checkNotNull(objectToCheck, "objectToCheck");
+
if (provider.isApplicable(objectToCheck)) {
ArtifactData data = provider.asCastedObject(objectToCheck);
+ Conditions.checkNotNull(data, "artifactData",
+ "artifact data provider returned null - provider has an isApplicable error");
+
collectApplicable(collector, context, data);
}
}

Back to the top