Author: svkrish
Date: Thu Aug 16 03:34:39 2007
New Revision: 566648
URL: http://svn.apache.org/viewvc?view=rev&rev=566648
Log:
added support for metadata related to binding and implemenation types
Added:
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPointType.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPointTypeFactory.java
- copied, changed from r565707,
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ExtensionTypeFactory.java
Removed:
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/BindingType.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ExtensionType.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ExtensionTypeFactory.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ImplementationType.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/DefaultExtensionTypeFactory.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/ExtensionTypeImpl.java
Modified:
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPoint.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/SCADefinitions.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/BindingTypeImpl.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/ImplementationTypeImpl.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/SCADefinitionsImpl.java
Modified:
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPoint.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPoint.java?view=diff&rev=566648&r1=566647&r2=566648
==============================================================================
---
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPoint.java
(original)
+++
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPoint.java
Thu Aug 16 03:34:39 2007
@@ -33,5 +33,17 @@
* @return a list of policy intents.
*/
List<Intent> getRequiredIntents();
-
+
+ /**
+ * Returns the type of the attach point such as a BindingType or an
ImplementationType and so on
+ * @return
+ */
+ IntentAttachPointType getType();
+
+ /**
+ *
+ * Sets the type of the attach point such as a BindingType or an
ImplementationType and so on
+ * @param type
+ */
+ void setType(IntentAttachPointType type);
}
Added:
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPointType.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPointType.java?view=auto&rev=566648
==============================================================================
---
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPointType.java
(added)
+++
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPointType.java
Thu Aug 16 03:34:39 2007
@@ -0,0 +1,69 @@
+/*
+ * 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.sca.policy;
+
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+/**
+ * Base interface for representing the model type of assembly model objects
that can be have policy intents
+ * attached to them.
+ */
+public interface IntentAttachPointType {
+
+ /**
+ * Returns the name of the extension type defined by this instance e.g.
implementation.java, binding.ws
+ * @return the extension type QName
+ */
+ QName getName();
+
+ /**
+ * Sets the name of the extension type
+ * @param the name of the extension type
+ */
+ void setName(QName type);
+
+ /**
+ * Returns the list of names of policy intents that will always be
provided by this Extension Type
+ * @ruturn list of Policy Intent names
+ */
+ List<Intent> getAlwaysProvidedIntents();
+
+ /**
+ * Returns the list of names of policy intents that may be provided by
this Extension Type thro
+ * appropriate configuration
+ * @ruturn list of Policy Intent names
+ */
+ List<Intent> getMayProvideIntents();
+
+ /**
+ * 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);
+}
Copied:
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPointTypeFactory.java
(from r565707,
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ExtensionTypeFactory.java)
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPointTypeFactory.java?view=diff&rev=566648&p1=incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ExtensionTypeFactory.java&r1=565707&p2=incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPointTypeFactory.java&r2=566648
==============================================================================
---
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ExtensionTypeFactory.java
(original)
+++
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/IntentAttachPointTypeFactory.java
Thu Aug 16 03:34:39 2007
@@ -22,21 +22,21 @@
* Factory interface for creating extension types meta data
*
*/
-public interface ExtensionTypeFactory {
+public interface IntentAttachPointTypeFactory {
/**
- * Creates an ImplementationType instance to hold metadata related to
+ * Creates an ImplementationTypeImpl instance to hold metadata related to
* a particular implementation extension in the SCA Domain
*
- * @return an instance of ImplementationType
+ * @return an instance of IntentAttachPointType
*/
- ImplementationType createImplementationType();
+ IntentAttachPointType createImplementationType();
/**
- * Creates an BindingType instance to hold metadata related to
+ * Creates an BindingTypeImpl instance to hold metadata related to
* a particular binding extension in the SCA Domain
*
- * @return an instance of BindingType
+ * @return an instance of IntentAttachPointType
*/
- BindingType createBindingType();
+ IntentAttachPointType createBindingType();
}
Modified:
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/SCADefinitions.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/SCADefinitions.java?view=diff&rev=566648&r1=566647&r2=566648
==============================================================================
---
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/SCADefinitions.java
(original)
+++
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/SCADefinitions.java
Thu Aug 16 03:34:39 2007
@@ -59,7 +59,7 @@
*
* @return a list of domain wide Binding Types
*/
- List<BindingType> getBindingTypes();
+ List<IntentAttachPointType> getBindingTypes();
/**
@@ -67,5 +67,5 @@
*
* @return a list of domain wide Implementation Types
*/
- List<ImplementationType> getImplementationTypes();
+ List<IntentAttachPointType> getImplementationTypes();
}
Modified:
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/BindingTypeImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/BindingTypeImpl.java?view=diff&rev=566648&r1=566647&r2=566648
==============================================================================
---
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/BindingTypeImpl.java
(original)
+++
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/BindingTypeImpl.java
Thu Aug 16 03:34:39 2007
@@ -18,11 +18,46 @@
*/
package org.apache.tuscany.sca.policy.impl;
-import org.apache.tuscany.sca.policy.BindingType;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.policy.Intent;
+import org.apache.tuscany.sca.policy.IntentAttachPointType;
/**
* Concrete implementation for a BindingType
*
*/
-public class BindingTypeImpl extends ExtensionTypeImpl implements BindingType {
+public class BindingTypeImpl implements IntentAttachPointType {
+
+ private List<Intent> alwaysProvides = new ArrayList<Intent>();
+ private List<Intent> mayProvides = new ArrayList<Intent>();
+ private QName typeName;
+ private boolean unResolved = true;
+
+ public List<Intent> getAlwaysProvidedIntents() {
+ return alwaysProvides;
+ }
+
+ public List<Intent> getMayProvideIntents() {
+ return mayProvides;
+ }
+
+ public QName getName() {
+ return typeName;
+ }
+
+ public void setName(QName type) {
+ this.typeName = type;
+ }
+
+ public boolean isUnresolved() {
+ return unResolved;
+ }
+
+ public void setUnresolved(boolean unresolved) {
+ this.unResolved = unresolved;
+ }
}
Modified:
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/ImplementationTypeImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/ImplementationTypeImpl.java?view=diff&rev=566648&r1=566647&r2=566648
==============================================================================
---
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/ImplementationTypeImpl.java
(original)
+++
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/ImplementationTypeImpl.java
Thu Aug 16 03:34:39 2007
@@ -18,11 +18,45 @@
*/
package org.apache.tuscany.sca.policy.impl;
-import org.apache.tuscany.sca.policy.ImplementationType;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.policy.Intent;
+import org.apache.tuscany.sca.policy.IntentAttachPointType;
/**
* Concrete implementation for a Implementation Type
*
*/
-public class ImplementationTypeImpl extends ExtensionTypeImpl implements
ImplementationType {
+public class ImplementationTypeImpl implements IntentAttachPointType {
+ private List<Intent> alwaysProvides = new ArrayList<Intent>();
+ private List<Intent> mayProvides = new ArrayList<Intent>();
+ private QName typeName;
+ private boolean unResolved = true;
+
+ public List<Intent> getAlwaysProvidedIntents() {
+ return alwaysProvides;
+ }
+
+ public List<Intent> getMayProvideIntents() {
+ return mayProvides;
+ }
+
+ public QName getName() {
+ return typeName;
+ }
+
+ public void setName(QName type) {
+ this.typeName = type;
+ }
+
+ public boolean isUnresolved() {
+ return unResolved;
+ }
+
+ public void setUnresolved(boolean unresolved) {
+ this.unResolved = unresolved;
+ }
}
Modified:
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/SCADefinitionsImpl.java
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/SCADefinitionsImpl.java?view=diff&rev=566648&r1=566647&r2=566648
==============================================================================
---
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/SCADefinitionsImpl.java
(original)
+++
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/SCADefinitionsImpl.java
Thu Aug 16 03:34:39 2007
@@ -23,11 +23,8 @@
import java.util.ArrayList;
import java.util.List;
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.policy.BindingType;
-import org.apache.tuscany.sca.policy.ImplementationType;
import org.apache.tuscany.sca.policy.Intent;
+import org.apache.tuscany.sca.policy.IntentAttachPointType;
import org.apache.tuscany.sca.policy.PolicySet;
import org.apache.tuscany.sca.policy.SCADefinitions;
@@ -39,15 +36,15 @@
private URI targetNamespace = null;
private List<Intent> policyIntents = new ArrayList<Intent>();
private List<PolicySet> policySets = new ArrayList<PolicySet>();
- private List<BindingType> bindingTypes = new ArrayList<BindingType>();
- private List<ImplementationType> implementationTypes = new
ArrayList<ImplementationType>();
+ private List<IntentAttachPointType> bindingTypes = new
ArrayList<IntentAttachPointType>();
+ private List<IntentAttachPointType> implementationTypes = new
ArrayList<IntentAttachPointType>();
- public List<BindingType> getBindingTypes() {
+ public List<IntentAttachPointType> getBindingTypes() {
return bindingTypes;
}
- public List<ImplementationType> getImplementationTypes() {
+ public List<IntentAttachPointType> getImplementationTypes() {
return implementationTypes;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]