summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Pielmann2012-05-15 08:21:40 (EDT)
committer Manik Kishore2012-05-22 06:43:42 (EDT)
commit3ad3ce9613974f68a3208aa46d57c89474de59a5 (patch)
tree7e6c976a83e51e5d4144bf631d5f3572c9f2feba
parente32107e02deac399969d3c878b86953fcaaf78a0 (diff)
downloadorg.eclipse.stardust.ide-3ad3ce9613974f68a3208aa46d57c89474de59a5.zip
org.eclipse.stardust.ide-3ad3ce9613974f68a3208aa46d57c89474de59a5.tar.gz
org.eclipse.stardust.ide-3ad3ce9613974f68a3208aa46d57c89474de59a5.tar.bz2
Jira-ID: CRNT-22428
Modeler Validator: Only Primitives for DMS Operation "Create Folder" allowed git-svn-id: http://emeafrazerg/svn/ipp/product/trunk/stardust/ide@56353 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b
-rw-r--r--modeling/org.eclipse.stardust.modeling.integration.dms/src/org/eclipse/stardust/modeling/integration/dms/data/AbstractDmsItemValidator.java3
-rw-r--r--modeling/org.eclipse.stardust.modeling.integration.dms/src/org/eclipse/stardust/modeling/integration/dms/data/DocumentBridgeObjectProvider.java39
-rw-r--r--modeling/org.eclipse.stardust.modeling.integration.dms/src/org/eclipse/stardust/modeling/integration/dms/data/DocumentFolderBridgeObject.java36
3 files changed, 76 insertions, 2 deletions
diff --git a/modeling/org.eclipse.stardust.modeling.integration.dms/src/org/eclipse/stardust/modeling/integration/dms/data/AbstractDmsItemValidator.java b/modeling/org.eclipse.stardust.modeling.integration.dms/src/org/eclipse/stardust/modeling/integration/dms/data/AbstractDmsItemValidator.java
index ea1dd14..dd98fef 100644
--- a/modeling/org.eclipse.stardust.modeling.integration.dms/src/org/eclipse/stardust/modeling/integration/dms/data/AbstractDmsItemValidator.java
+++ b/modeling/org.eclipse.stardust.modeling.integration.dms/src/org/eclipse/stardust/modeling/integration/dms/data/AbstractDmsItemValidator.java
@@ -31,7 +31,6 @@ import org.eclipse.stardust.model.xpdl.util.IObjectReference;
import org.eclipse.stardust.model.xpdl.xpdl2.TypeDeclarationType;
import org.eclipse.stardust.model.xpdl.xpdl2.TypeDeclarationsType;
import org.eclipse.stardust.modeling.data.structured.validation.StructBridgeObject;
-import org.eclipse.stardust.modeling.data.structured.validation.StructBridgeObjectProvider;
import org.eclipse.stardust.modeling.integration.dms.DMS_Messages;
import org.eclipse.stardust.modeling.validation.BridgeObject;
import org.eclipse.stardust.modeling.validation.IBridgeObjectProvider;
@@ -138,7 +137,7 @@ public abstract class AbstractDmsItemValidator
}
else
{
- return new StructBridgeObjectProvider().getBridgeObject(accessPoint,
+ return new DocumentBridgeObjectProvider().getBridgeObject(accessPoint,
accessPath, direction);
}
}
diff --git a/modeling/org.eclipse.stardust.modeling.integration.dms/src/org/eclipse/stardust/modeling/integration/dms/data/DocumentBridgeObjectProvider.java b/modeling/org.eclipse.stardust.modeling.integration.dms/src/org/eclipse/stardust/modeling/integration/dms/data/DocumentBridgeObjectProvider.java
new file mode 100644
index 0000000..ef94275
--- /dev/null
+++ b/modeling/org.eclipse.stardust.modeling.integration.dms/src/org/eclipse/stardust/modeling/integration/dms/data/DocumentBridgeObjectProvider.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * Copyright (c) 2012 SunGard CSA LLC and others.
+ * 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:
+ * SunGard CSA LLC - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.stardust.modeling.integration.dms.data;
+
+import org.eclipse.stardust.model.xpdl.carnot.AccessPointType;
+import org.eclipse.stardust.model.xpdl.carnot.DirectionType;
+import org.eclipse.stardust.model.xpdl.carnot.ITypedElement;
+import org.eclipse.stardust.modeling.data.structured.validation.StructBridgeObjectProvider;
+import org.eclipse.stardust.modeling.validation.BridgeObject;
+import org.eclipse.stardust.modeling.validation.ValidationException;
+import org.eclipse.stardust.modeling.validation.util.PathEntry;
+
+public class DocumentBridgeObjectProvider extends StructBridgeObjectProvider
+{
+
+ @Override
+ public BridgeObject getBridgeObject(ITypedElement ap, String accessPath,
+ DirectionType direction) throws ValidationException
+ {
+ BridgeObject sat = super.getBridgeObject(ap, accessPath, direction);
+ PathEntry entry = new PathEntry(ap, direction);
+ if (ap instanceof AccessPointType)
+ {
+ if (ap.getMetaType().getId().startsWith("dmsFolder")) { //$NON-NLS-1$
+ return new DocumentFolderBridgeObject(sat.getEndClass(), direction, entry);
+ }
+ }
+ return super.getBridgeObject(ap, accessPath, direction);
+ }
+
+}
diff --git a/modeling/org.eclipse.stardust.modeling.integration.dms/src/org/eclipse/stardust/modeling/integration/dms/data/DocumentFolderBridgeObject.java b/modeling/org.eclipse.stardust.modeling.integration.dms/src/org/eclipse/stardust/modeling/integration/dms/data/DocumentFolderBridgeObject.java
new file mode 100644
index 0000000..f4f3907
--- /dev/null
+++ b/modeling/org.eclipse.stardust.modeling.integration.dms/src/org/eclipse/stardust/modeling/integration/dms/data/DocumentFolderBridgeObject.java
@@ -0,0 +1,36 @@
+/*******************************************************************************
+ * Copyright (c) 2012 SunGard CSA LLC and others.
+ * 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:
+ * SunGard CSA LLC - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.stardust.modeling.integration.dms.data;
+
+import org.eclipse.jdt.core.IType;
+import org.eclipse.stardust.model.xpdl.carnot.DirectionType;
+import org.eclipse.stardust.modeling.data.structured.validation.StructBridgeObject;
+import org.eclipse.stardust.modeling.validation.BridgeObject;
+import org.eclipse.stardust.modeling.validation.util.PathEntry;
+
+public class DocumentFolderBridgeObject extends StructBridgeObject
+{
+
+ public DocumentFolderBridgeObject(IType accessPointType, DirectionType direction,
+ PathEntry entry)
+ {
+ super(accessPointType, direction, entry);
+ // TODO Auto-generated constructor stub
+ }
+
+ @Override
+ public boolean acceptAssignmentFrom(BridgeObject rhs)
+ {
+ actualTypeName = null;
+ return super.acceptAssignmentFrom(rhs);
+ }
+
+}