Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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/ArtifactDataProvider.java82
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/OseeDslAccessModel.java148
-rw-r--r--plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/RestrictionHandler.java48
3 files changed, 139 insertions, 139 deletions
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/ArtifactDataProvider.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/ArtifactDataProvider.java
index 3c30ccf10d0..30e7e675e2c 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/ArtifactDataProvider.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/ArtifactDataProvider.java
@@ -1,42 +1,42 @@
-/*******************************************************************************
- * 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.core.dsl.integration;
-
-import java.util.Collection;
-import org.eclipse.osee.framework.core.data.IAttributeType;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.model.IBasicArtifact;
-import org.eclipse.osee.framework.core.model.type.ArtifactType;
-import org.eclipse.osee.framework.core.model.type.RelationType;
-
-/**
- * @author Roberto E. Escobar
- */
-public interface ArtifactDataProvider {
-
- public static interface ArtifactData {
- String getGuid();
-
- ArtifactType getArtifactType();
-
- boolean isAttributeTypeValid(IAttributeType attributeType) throws OseeCoreException;
-
- Collection<RelationType> getValidRelationTypes() throws OseeCoreException;
-
- Collection<String> getHierarchy();
-
- IBasicArtifact<?> getObject();
- }
-
- boolean isApplicable(Object object);
-
- ArtifactData asCastedObject(Object object) throws OseeCoreException;
+/*******************************************************************************
+ * 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.core.dsl.integration;
+
+import java.util.Collection;
+import org.eclipse.osee.framework.core.data.IAttributeType;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.model.IBasicArtifact;
+import org.eclipse.osee.framework.core.model.type.ArtifactType;
+import org.eclipse.osee.framework.core.model.type.RelationType;
+
+/**
+ * @author Roberto E. Escobar
+ */
+public interface ArtifactDataProvider {
+
+ public static interface ArtifactData {
+ String getGuid();
+
+ ArtifactType getArtifactType();
+
+ boolean isAttributeTypeValid(IAttributeType attributeType) throws OseeCoreException;
+
+ Collection<RelationType> getValidRelationTypes() throws OseeCoreException;
+
+ Collection<String> getHierarchy();
+
+ IBasicArtifact<?> getObject();
+ }
+
+ boolean isApplicable(Object object);
+
+ ArtifactData asCastedObject(Object object) throws OseeCoreException;
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/OseeDslAccessModel.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/OseeDslAccessModel.java
index e10df887d67..eb45b181557 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/OseeDslAccessModel.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/OseeDslAccessModel.java
@@ -1,75 +1,75 @@
-/*******************************************************************************
- * 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.core.dsl.integration;
-
-import java.util.Collection;
-import java.util.HashSet;
-import org.eclipse.osee.framework.core.data.AccessContextId;
-import org.eclipse.osee.framework.core.dsl.oseeDsl.AccessContext;
-import org.eclipse.osee.framework.core.dsl.oseeDsl.OseeDsl;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.model.access.AccessData;
-import org.eclipse.osee.framework.core.model.access.AccessDetail;
-import org.eclipse.osee.framework.core.model.access.AccessDetailCollector;
-import org.eclipse.osee.framework.core.model.access.AccessModel;
-import org.eclipse.osee.framework.core.util.Conditions;
-
-/**
- * @author Roberto E. Escobar
- */
-public class OseeDslAccessModel implements AccessModel {
- private final AccessModelInterpreter interpreter;
- private final OseeDslProvider dslProvider;
-
- public OseeDslAccessModel(AccessModelInterpreter interpreter, OseeDslProvider dslProvider) {
- this.interpreter = interpreter;
- this.dslProvider = dslProvider;
- }
-
- @Override
- public void computeAccess(AccessContextId contextId, Collection<Object> objectsToCheck, AccessData accessData) throws OseeCoreException {
- Conditions.checkNotNull(contextId, "contextId");
- Conditions.checkNotNull(objectsToCheck, "objectsToCheck");
- Conditions.checkNotNull(accessData, "accessData");
-
- OseeDsl oseeDsl = dslProvider.getDsl();
- Conditions.checkNotNull(oseeDsl, "oseeDsl", "dsl provider returned null");
-
- Collection<AccessContext> contexts = oseeDsl.getAccessDeclarations();
- AccessContext context = interpreter.getContext(contexts, contextId);
- Conditions.checkNotNull(context, "interpreted accessContext",
- "No matching access context was found in access dsl for [%s]", contextId);
-
- for (Object objectToCheck : objectsToCheck) {
- Collection<AccessDetail<?>> accessDetail = new HashSet<AccessDetail<?>>();
- AccessDetailCollector collector = new AccessDataCollector(accessDetail);
- interpreter.computeAccessDetails(collector, context, objectToCheck);
- accessData.addAll(objectToCheck, accessDetail);
- }
- }
-
- private static final class AccessDataCollector implements AccessDetailCollector {
- private final Collection<AccessDetail<?>> accessDetails;
-
- public AccessDataCollector(Collection<AccessDetail<?>> accessDetails) {
- this.accessDetails = accessDetails;
- }
-
- @Override
- public void collect(AccessDetail<?> accessDetail) {
- if (accessDetail != null) {
- if (!accessDetails.contains(accessDetail)) {
- accessDetails.add(accessDetail);
- }
- }
- }
- }
+/*******************************************************************************
+ * 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.core.dsl.integration;
+
+import java.util.Collection;
+import java.util.HashSet;
+import org.eclipse.osee.framework.core.data.AccessContextId;
+import org.eclipse.osee.framework.core.dsl.oseeDsl.AccessContext;
+import org.eclipse.osee.framework.core.dsl.oseeDsl.OseeDsl;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.model.access.AccessData;
+import org.eclipse.osee.framework.core.model.access.AccessDetail;
+import org.eclipse.osee.framework.core.model.access.AccessDetailCollector;
+import org.eclipse.osee.framework.core.model.access.AccessModel;
+import org.eclipse.osee.framework.core.util.Conditions;
+
+/**
+ * @author Roberto E. Escobar
+ */
+public class OseeDslAccessModel implements AccessModel {
+ private final AccessModelInterpreter interpreter;
+ private final OseeDslProvider dslProvider;
+
+ public OseeDslAccessModel(AccessModelInterpreter interpreter, OseeDslProvider dslProvider) {
+ this.interpreter = interpreter;
+ this.dslProvider = dslProvider;
+ }
+
+ @Override
+ public void computeAccess(AccessContextId contextId, Collection<Object> objectsToCheck, AccessData accessData) throws OseeCoreException {
+ Conditions.checkNotNull(contextId, "contextId");
+ Conditions.checkNotNull(objectsToCheck, "objectsToCheck");
+ Conditions.checkNotNull(accessData, "accessData");
+
+ OseeDsl oseeDsl = dslProvider.getDsl();
+ Conditions.checkNotNull(oseeDsl, "oseeDsl", "dsl provider returned null");
+
+ Collection<AccessContext> contexts = oseeDsl.getAccessDeclarations();
+ AccessContext context = interpreter.getContext(contexts, contextId);
+ Conditions.checkNotNull(context, "interpreted accessContext",
+ "No matching access context was found in access dsl for [%s]", contextId);
+
+ for (Object objectToCheck : objectsToCheck) {
+ Collection<AccessDetail<?>> accessDetail = new HashSet<AccessDetail<?>>();
+ AccessDetailCollector collector = new AccessDataCollector(accessDetail);
+ interpreter.computeAccessDetails(collector, context, objectToCheck);
+ accessData.addAll(objectToCheck, accessDetail);
+ }
+ }
+
+ private static final class AccessDataCollector implements AccessDetailCollector {
+ private final Collection<AccessDetail<?>> accessDetails;
+
+ public AccessDataCollector(Collection<AccessDetail<?>> accessDetails) {
+ this.accessDetails = accessDetails;
+ }
+
+ @Override
+ public void collect(AccessDetail<?> accessDetail) {
+ if (accessDetail != null) {
+ if (!accessDetails.contains(accessDetail)) {
+ accessDetails.add(accessDetail);
+ }
+ }
+ }
+ }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/RestrictionHandler.java b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/RestrictionHandler.java
index e1968f441da..ce6fee56aa4 100644
--- a/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/RestrictionHandler.java
+++ b/plugins/org.eclipse.osee.framework.core.dsl.integration/src/org/eclipse/osee/framework/core/dsl/integration/RestrictionHandler.java
@@ -1,25 +1,25 @@
-/*******************************************************************************
- * 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.core.dsl.integration;
-
-import org.eclipse.osee.framework.core.dsl.integration.ArtifactDataProvider.ArtifactData;
-import org.eclipse.osee.framework.core.dsl.oseeDsl.ObjectRestriction;
-import org.eclipse.osee.framework.core.exception.OseeCoreException;
-import org.eclipse.osee.framework.core.model.access.AccessDetailCollector;
-
-/**
- * @author Roberto E. Escobar
- */
-public interface RestrictionHandler<T> {
- public T asCastedObject(ObjectRestriction objectRestriction);
-
- public void process(ObjectRestriction objectRestriction, ArtifactData artifactData, AccessDetailCollector collector) throws OseeCoreException;
+/*******************************************************************************
+ * 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.core.dsl.integration;
+
+import org.eclipse.osee.framework.core.dsl.integration.ArtifactDataProvider.ArtifactData;
+import org.eclipse.osee.framework.core.dsl.oseeDsl.ObjectRestriction;
+import org.eclipse.osee.framework.core.exception.OseeCoreException;
+import org.eclipse.osee.framework.core.model.access.AccessDetailCollector;
+
+/**
+ * @author Roberto E. Escobar
+ */
+public interface RestrictionHandler<T> {
+ public T asCastedObject(ObjectRestriction objectRestriction);
+
+ public void process(ObjectRestriction objectRestriction, ArtifactData artifactData, AccessDetailCollector collector) throws OseeCoreException;
} \ No newline at end of file

Back to the top