tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r525073 - in /incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany: policy/model/ policy/model/impl/ spi/
Date Tue, 03 Apr 2007 07:44:28 GMT
Author: jsdelfino
Date: Tue Apr  3 00:44:27 2007
New Revision: 525073

URL: http://svn.apache.org/viewvc?view=rev&rev=525073
Log:
Added policy IntentMap model. Added missing attributes and relationships to Intent and PolicySet.

Added:
    incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/IntentMap.java
  (with props)
    incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/IntentMapImpl.java
  (with props)
Removed:
    incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/spi/
Modified:
    incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/Intent.java
    incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/PolicyFactory.java
    incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/PolicySet.java
    incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/DefaultPolicyFactory.java
    incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/IntentImpl.java
    incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/PolicySetImpl.java

Modified: incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/Intent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/Intent.java?view=diff&rev=525073&r1=525072&r2=525073
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/Intent.java
(original)
+++ incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/Intent.java
Tue Apr  3 00:44:27 2007
@@ -27,7 +27,7 @@
 
 
 /**
- * Represents a policy intent.  See the Policy Framework specification for a description
of this attribute.
+ * Represents a policy intent.  See the Policy Framework specification for a description
of this element.
  */
 public interface Intent {
 
@@ -48,5 +48,49 @@
 	 * @return
 	 */
 	List<Operation> getOperations();
-	
+
+        /**
+         * Returns the list of SCA constructs that this intent is meant to configure.
+         * @return the list of SCA constructs that this intent is meant to configure
+         */
+        List<QName> getConstrains();
+        
+        /**
+         * Returns the list of required intents. 
+         * @return
+         */
+        List<Intent> getRequiredIntents();
+
+        /**
+         * Returns the list of children qualified intents.
+         * @return the list of children qualified intents.
+         */
+        List<Intent> getQualifiedIntents();
+        
+        /**
+         * Returns the intent description.
+         * @return the intent description
+         */
+        String getDescription();
+        
+        /**
+         * Sets the intent description. 
+         * @param description the intent description
+         */
+        void setDescription(String description);
+        
+        /**
+         * Returns true if the model element is unresolved.
+         * 
+         * @return true if the model element is unresolved.
+         */
+        boolean isUnresolved();
+
+        /**
+         * Sets whether the model element is unresolved.
+         * 
+         * @param unresolved whether the model element is unresolved
+         */
+        void setUnresolved(boolean unresolved);
+
 }

Added: incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/IntentMap.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/IntentMap.java?view=auto&rev=525073
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/IntentMap.java
(added)
+++ incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/IntentMap.java
Tue Apr  3 00:44:27 2007
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.policy.model;
+
+import java.util.List;
+
+
+
+
+/**
+ * Represents a policy intent map.  See the Policy Framework specification for a description
of this element.
+ */
+public interface IntentMap {
+
+	/**
+	 * Returns the intent realized by this intent map.
+	 * @return the intent realized by this intent map
+	 */
+	Intent getProvidedIntent();
+	
+	/**
+         * Sets the intent realized by this intent map.
+	 * @param providedIntent the intent realized by this intent map
+	 */
+	void setProvidedIntent(Intent providedIntent);
+        
+        /**
+         * Returns the default qualified intent map.
+         * @return the default qualified intent map
+         */
+        IntentMap getDefaultQualifiedIntentMap();
+        
+        /**
+         * Sets the default qualified intent map.
+         * @param defaultQualifiedIntentMap the default qualified intent map
+         */
+        void setDefaultQualifiedIntentMap(IntentMap defaultQualifiedIntentMap);
+        
+        /**
+         * Returns the list of children qualified intent maps.
+         * @return
+         */
+        List<IntentMap> getQualifiedIntentMaps();
+
+        /**
+         * Returns the list of concrete policies, either WS-Policy policy attachments, policy
+         * references, or policies expressed in another policy language.  
+         * @return the list of concrete policies
+         */
+        List<Object> getPolicies();
+        
+        /**
+         * Returns true if the model element is unresolved.
+         * 
+         * @return true if the model element is unresolved.
+         */
+        boolean isUnresolved();
+
+        /**
+         * Sets whether the model element is unresolved.
+         * 
+         * @param unresolved whether the model element is unresolved
+         */
+        void setUnresolved(boolean unresolved);
+
+}

Propchange: incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/IntentMap.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/IntentMap.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/PolicyFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/PolicyFactory.java?view=diff&rev=525073&r1=525072&r2=525073
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/PolicyFactory.java
(original)
+++ incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/PolicyFactory.java
Tue Apr  3 00:44:27 2007
@@ -36,5 +36,11 @@
 	 * @return a new policy set
 	 */
 	PolicySet createPolicySet();
+        
+        /**
+         * Create a new intent map.
+         * @return a new intent map
+         */
+        IntentMap createIntentMap();
     
 }

Modified: incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/PolicySet.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/PolicySet.java?view=diff&rev=525073&r1=525072&r2=525073
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/PolicySet.java
(original)
+++ incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/PolicySet.java
Tue Apr  3 00:44:27 2007
@@ -27,7 +27,7 @@
 
 
 /**
- * Represents a policy set.  See the Policy Framework specification for a description of
this attribute.
+ * Represents a policy set.  See the Policy Framework specification for a description of
this element.
  */
 public interface PolicySet {
     
@@ -48,5 +48,44 @@
 	 * @return
 	 */
 	List<Operation> getOperations();
-	
+
+        /**
+         * Returns the list of 
+         * @return
+         */
+        List<PolicySet> getReferencedPolicySets();
+        
+        /**
+         * Returns the list of provided intents
+         * @return
+         */
+        List<Intent> getProvidedIntents(); 
+        
+        /**
+         * Returns the list of SCA constructs that this policy set is meant to configure.
+         * @return the list of SCA constructs that this policy set is meant to configure
+         */
+        List<QName> getAppliesTo();
+        
+        /**
+         * Returns the list of concrete policies, either WS-Policy policy attachments, policy
+         * references, or policies expressed in another policy language.  
+         * @return the list of concrete policies
+         */
+        List<Object> getPolicies();
+        
+        /**
+         * Returns true if the model element is unresolved.
+         * 
+         * @return true if the model element is unresolved.
+         */
+        boolean isUnresolved();
+
+        /**
+         * Sets whether the model element is unresolved.
+         * 
+         * @param unresolved whether the model element is unresolved
+         */
+        void setUnresolved(boolean unresolved);
+
 }

Modified: incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/DefaultPolicyFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/DefaultPolicyFactory.java?view=diff&rev=525073&r1=525072&r2=525073
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/DefaultPolicyFactory.java
(original)
+++ incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/DefaultPolicyFactory.java
Tue Apr  3 00:44:27 2007
@@ -19,6 +19,7 @@
 package org.apache.tuscany.policy.model.impl;
 
 import org.apache.tuscany.policy.model.Intent;
+import org.apache.tuscany.policy.model.IntentMap;
 import org.apache.tuscany.policy.model.PolicyFactory;
 import org.apache.tuscany.policy.model.PolicySet;
 
@@ -36,5 +37,9 @@
 	public PolicySet createPolicySet() {
 		return new PolicySetImpl();
 	}
+        
+        public IntentMap createIntentMap() {
+            return new IntentMapImpl();
+        }
 
 }

Modified: incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/IntentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/IntentImpl.java?view=diff&rev=525073&r1=525072&r2=525073
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/IntentImpl.java
(original)
+++ incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/IntentImpl.java
Tue Apr  3 00:44:27 2007
@@ -35,6 +35,11 @@
 	
 	private QName name;
 	private List<Operation> operations = new ArrayList<Operation>();
+        private List<QName> constrains;
+        private String description;
+        private List<Intent> qualifiedIntents;
+        private List<Intent> requiredIntents;
+        private boolean unresolved;
 
 	public QName getName() {
 		return name;
@@ -48,4 +53,31 @@
 		return operations;
 	}
 
+        public List<QName> getConstrains() {
+            return constrains;
+        }
+        
+        public String getDescription() {
+            return description;
+        }
+        
+        public void setDescription(String description) {
+            this.description = description;
+        }
+        
+        public List<Intent> getQualifiedIntents() {
+            return qualifiedIntents;
+        }
+        
+        public List<Intent> getRequiredIntents() {
+            return requiredIntents;
+        }
+        
+        public boolean isUnresolved() {
+            return unresolved;
+        }
+        
+        public void setUnresolved(boolean unresolved) {
+            this.unresolved = unresolved;
+        }
 }

Added: incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/IntentMapImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/IntentMapImpl.java?view=auto&rev=525073
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/IntentMapImpl.java
(added)
+++ incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/IntentMapImpl.java
Tue Apr  3 00:44:27 2007
@@ -0,0 +1,70 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.policy.model.impl;
+
+import java.util.List;
+
+import org.apache.tuscany.policy.model.Intent;
+import org.apache.tuscany.policy.model.IntentMap;
+
+/**
+ * Represents an intent map.
+ *
+ *  @version $Rev$ $Date$
+ */
+public class IntentMapImpl implements IntentMap {
+	
+        private boolean unresolved;
+        private IntentMap defaultQualifiedIntentMap;
+        private List<Object> policies;
+        private Intent providedIntent;
+        private List<IntentMap> qualifiedIntentMaps;
+
+        public IntentMap getDefaultQualifiedIntentMap() {
+            return defaultQualifiedIntentMap;
+        }
+
+        public List<Object> getPolicies() {
+            return policies;
+        }
+
+        public Intent getProvidedIntent() {
+            return providedIntent;
+        }
+
+        public List<IntentMap> getQualifiedIntentMaps() {
+            return qualifiedIntentMaps;
+        }
+
+        public void setDefaultQualifiedIntentMap(IntentMap defaultQualifiedIntentMap) {
+            this.defaultQualifiedIntentMap = defaultQualifiedIntentMap;
+        }
+
+        public void setProvidedIntent(Intent providedIntent) {
+            this.providedIntent = providedIntent;
+        }
+
+        public boolean isUnresolved() {
+            return unresolved;
+        }
+        
+        public void setUnresolved(boolean unresolved) {
+            this.unresolved = unresolved;
+        }
+}

Propchange: incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/IntentMapImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/IntentMapImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/PolicySetImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/PolicySetImpl.java?view=diff&rev=525073&r1=525072&r2=525073
==============================================================================
--- incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/PolicySetImpl.java
(original)
+++ incubator/tuscany/java/sca/scdl4j/policy/src/main/java/org/apache/tuscany/policy/model/impl/PolicySetImpl.java
Tue Apr  3 00:44:27 2007
@@ -23,6 +23,7 @@
 
 import javax.xml.namespace.QName;
 
+import org.apache.tuscany.policy.model.Intent;
 import org.apache.tuscany.policy.model.PolicySet;
 import org.apache.tuscany.sca.idl.Operation;
 
@@ -35,6 +36,11 @@
 	
 	private QName name;
 	private List<Operation> operations = new ArrayList<Operation>();
+        private List<QName> appliesTo;
+        private List<Intent> providedIntents;
+        private List<PolicySet> referencedPolicySets;
+        private List<Object> policies;
+        private boolean unresolved;
 
 	public QName getName() {
 		return name;
@@ -48,4 +54,27 @@
 		return operations;
 	}
 
+        public List<QName> getAppliesTo() {
+            return appliesTo;
+        }
+        
+        public List<Intent> getProvidedIntents() {
+            return providedIntents;
+        }
+        
+        public List<PolicySet> getReferencedPolicySets() {
+            return referencedPolicySets;
+        }
+        
+        public List<Object> getPolicies() {
+            return policies;
+        }
+        
+        public boolean isUnresolved() {
+            return unresolved;
+        }
+        
+        public void setUnresolved(boolean unresolved) {
+            this.unresolved = unresolved;
+        }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message