You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sv...@apache.org on 2007/07/12 20:13:57 UTC
svn commit: r555708 - in
/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy:
./ impl/
Author: svkrish
Date: Thu Jul 12 11:13:55 2007
New Revision: 555708
URL: http://svn.apache.org/viewvc?view=rev&rev=555708
Log:
adding abstractions for policy intents
Added:
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/ImplementationType.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ProfileIntent.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/QualifiedIntent.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/ProfileIntentImpl.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/QualifiedIntentImpl.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/Intent.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/PolicyFactory.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/IntentImpl.java
incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/PolicyFactoryImpl.java
Added: incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/BindingType.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/BindingType.java?view=auto&rev=555708
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/BindingType.java (added)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/BindingType.java Thu Jul 12 11:13:55 2007
@@ -0,0 +1,28 @@
+ /*
+ * 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;
+
+
+
+/**
+ * Represents a Binding Type and its support of various QoS policies
+ *
+ */
+public interface BindingType extends ExtensionType {
+}
Added: incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ExtensionType.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ExtensionType.java?view=auto&rev=555708
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ExtensionType.java (added)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ExtensionType.java Thu Jul 12 11:13:55 2007
@@ -0,0 +1,56 @@
+/*
+ * 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;
+
+
+/**
+ * Represents the base ExtensionType for BindingType and ImplementationType
+ * and its support of various QoS policies
+ *
+ */
+public interface ExtensionType /*extends Visitable*/ {
+ /**
+ * Returns the name of the extension type defined by this instance e.g. implementation.java, binding.ws
+ * @return the extension type QName
+ */
+ QName getTypeName();
+
+ /**
+ * Sets the name of the extension type
+ * @param the name of the extension type
+ */
+ void setTypeName(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<QName> getAlwaysProvidedPolicyIntents();
+
+ /**
+ * 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<QName> getMayProvidePolicyIntents();
+}
Added: incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ImplementationType.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ImplementationType.java?view=auto&rev=555708
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ImplementationType.java (added)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ImplementationType.java Thu Jul 12 11:13:55 2007
@@ -0,0 +1,29 @@
+/*
+ * 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;
+
+
+
+/**
+ * Represents an Implementation Type and its support of various QoS policies
+ *
+ */
+public interface ImplementationType extends ExtensionType {
+}
Modified: incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/Intent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/Intent.java?view=diff&rev=555708&r1=555707&r2=555708
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/Intent.java (original)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/Intent.java Thu Jul 12 11:13:55 2007
@@ -60,18 +60,11 @@
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();
+ //List<Intent> getQualifiedIntents();
/**
* Returns the intent description.
Modified: incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/PolicyFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/PolicyFactory.java?view=diff&rev=555708&r1=555707&r2=555708
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/PolicyFactory.java (original)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/PolicyFactory.java Thu Jul 12 11:13:55 2007
@@ -44,4 +44,17 @@
*/
IntentMap createIntentMap();
+ /**
+ * create a new Profile Intent
+ *
+ * @return a ProfileIntent instance
+ */
+ ProfileIntent createProfileIntent();
+
+ /**
+ * create a new QualifiedIntent
+ *
+ * @return a QualifiedIntent instance
+ */
+ QualifiedIntent createQualifiedIntent();
}
Added: incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ProfileIntent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ProfileIntent.java?view=auto&rev=555708
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ProfileIntent.java (added)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/ProfileIntent.java Thu Jul 12 11:13:55 2007
@@ -0,0 +1,35 @@
+/*
+ * 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;
+
+/**
+ * Interface that abstracts a profile intent
+ *
+ */
+public interface ProfileIntent extends Intent {
+ /**
+ * Returns the list of required intents.
+ *
+ * @return the list of required intents
+ */
+ List<Intent> getRequiredIntents();
+
+}
Added: incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/QualifiedIntent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/QualifiedIntent.java?view=auto&rev=555708
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/QualifiedIntent.java (added)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/QualifiedIntent.java Thu Jul 12 11:13:55 2007
@@ -0,0 +1,40 @@
+/*
+ * 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;
+
+/**
+ * Abstracts a qualified policy intent
+ *
+ */
+public interface QualifiedIntent extends Intent {
+
+ /**
+ * Returns the intent qualified by this intent
+ *
+ * @return
+ */
+ Intent getQualifiableIntent();
+
+ /**
+ * sets the qualifiable intent for this Qualified intent instance
+ *
+ * @param qualifiableIntent
+ */
+ void setQualifiableIntent(Intent qualifiableIntent);
+}
Added: 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=auto&rev=555708
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/SCADefinitions.java (added)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/SCADefinitions.java Thu Jul 12 11:13:55 2007
@@ -0,0 +1,73 @@
+ /*
+ * 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.net.URI;
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+
+/**
+ * Represents SCA Definitions.
+ *
+ */
+public interface SCADefinitions /*extends Visitable*/ {
+ /**
+ * Returns the target namespace for this SCA Definition
+ * @return the target namespace
+ */
+ URI getTargetNamespace();
+
+ /**
+ * Sets the target names for this SCA Definition
+ *
+ * @param the target namespace for this SCA Definition
+ */
+ void setTargetNamespace(URI ns);
+
+ /**
+ * Returns a list of domain wide Policy Intents
+ *
+ * @return a list of domain wide Policy Intents
+ */
+ List<Intent> getPolicyIntents();
+
+ /**
+ * Returns a list of domain wide PolicySets
+ *
+ * @return a list of domain wide PolicySets
+ */
+ List<PolicySet> getPolicySets();
+
+ /**
+ * Returns a list of domain wide Binding Types
+ *
+ * @return a list of domain wide Binding Types
+ */
+ List<BindingType> getBindingTypes();
+
+
+ /**
+ * Returns a list of domain wide Implementation Types
+ *
+ * @return a list of domain wide Implementation Types
+ */
+ List<ImplementationType> getImplementationTypes();
+}
Modified: incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/IntentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/IntentImpl.java?view=diff&rev=555708&r1=555707&r2=555708
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/IntentImpl.java (original)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/IntentImpl.java Thu Jul 12 11:13:55 2007
@@ -35,11 +35,10 @@
private QName name;
private List<Operation> operations = new ArrayList<Operation>();
- private List<QName> constrains;
+ private List<QName> constrains = new ArrayList<QName>();
private String description;
- private List<Intent> qualifiedIntents;
- private List<Intent> requiredIntents;
- private boolean unresolved;
+ //private List<Intent> qualifiedIntents;
+ private boolean unresolved = true;
protected IntentImpl() {
}
@@ -68,13 +67,9 @@
this.description = description;
}
- public List<Intent> getQualifiedIntents() {
+ /*public List<Intent> getQualifiedIntents() {
return qualifiedIntents;
- }
-
- public List<Intent> getRequiredIntents() {
- return requiredIntents;
- }
+ }*/
public boolean isUnresolved() {
return unresolved;
@@ -82,5 +77,25 @@
public void setUnresolved(boolean unresolved) {
this.unresolved = unresolved;
+ }
+
+ @Override
+ public int hashCode() {
+ return String.valueOf(getName()).hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == this) {
+ return true;
+ } else if (obj instanceof Intent) {
+ if (getName() != null) {
+ return getName().equals(((Intent)obj).getName());
+ } else {
+ return ((Intent)obj).getName() == null;
+ }
+ } else {
+ return false;
+ }
}
}
Modified: incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/PolicyFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/PolicyFactoryImpl.java?view=diff&rev=555708&r1=555707&r2=555708
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/PolicyFactoryImpl.java (original)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/PolicyFactoryImpl.java Thu Jul 12 11:13:55 2007
@@ -22,6 +22,8 @@
import org.apache.tuscany.sca.policy.IntentMap;
import org.apache.tuscany.sca.policy.PolicyFactory;
import org.apache.tuscany.sca.policy.PolicySet;
+import org.apache.tuscany.sca.policy.ProfileIntent;
+import org.apache.tuscany.sca.policy.QualifiedIntent;
/**
* A factory for the policy model.
@@ -40,6 +42,14 @@
public IntentMap createIntentMap() {
return new IntentMapImpl();
+ }
+
+ public ProfileIntent createProfileIntent() {
+ return new ProfileIntentImpl();
+ }
+
+ public QualifiedIntent createQualifiedIntent() {
+ return new QualifiedIntentImpl();
}
}
Added: incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/ProfileIntentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/ProfileIntentImpl.java?view=auto&rev=555708
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/ProfileIntentImpl.java (added)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/ProfileIntentImpl.java Thu Jul 12 11:13:55 2007
@@ -0,0 +1,38 @@
+/*
+ * 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.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.tuscany.sca.policy.Intent;
+import org.apache.tuscany.sca.policy.ProfileIntent;
+
+/**
+ * Concrete implementation for Profile Intent
+ *
+ */
+public class ProfileIntentImpl extends IntentImpl implements ProfileIntent {
+ private List<Intent> requiredIntents = new ArrayList<Intent>();
+
+ public List<Intent> getRequiredIntents() {
+ return requiredIntents;
+ }
+
+}
Added: incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/QualifiedIntentImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/QualifiedIntentImpl.java?view=auto&rev=555708
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/QualifiedIntentImpl.java (added)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/QualifiedIntentImpl.java Thu Jul 12 11:13:55 2007
@@ -0,0 +1,49 @@
+/*
+ * 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.impl;
+
+import java.util.List;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.policy.Intent;
+import org.apache.tuscany.sca.policy.QualifiedIntent;
+
+/**
+ * Models a concrete implementation of a Qualified Intent
+ *
+ */
+public class QualifiedIntentImpl extends IntentImpl implements QualifiedIntent {
+ private Intent qualifiableIntent = null;
+
+ public Intent getQualifiableIntent() {
+ return qualifiableIntent;
+ }
+
+ public void setQualifiableIntent(Intent qualifiableIntent) {
+ this.qualifiableIntent = qualifiableIntent;
+ }
+
+ @Override
+ public List<QName> getConstrains() {
+ return getQualifiableIntent().getConstrains();
+ }
+
+
+}
Added: 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=auto&rev=555708
==============================================================================
--- incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/SCADefinitionsImpl.java (added)
+++ incubator/tuscany/java/sca/modules/policy/src/main/java/org/apache/tuscany/sca/policy/impl/SCADefinitionsImpl.java Thu Jul 12 11:13:55 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.sca.policy.impl;
+
+import java.net.URI;
+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.PolicySet;
+import org.apache.tuscany.sca.policy.SCADefinitions;
+
+/**
+ * Provides a concrete implementation for SCADefinitions
+ *
+ */
+public class SCADefinitionsImpl implements SCADefinitions {
+ 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>();
+
+
+ public List<BindingType> getBindingTypes() {
+ return bindingTypes;
+ }
+
+ public List<ImplementationType> getImplementationTypes() {
+ return implementationTypes;
+ }
+
+ public List<Intent> getPolicyIntents() {
+ return policyIntents;
+ }
+
+ public List<PolicySet> getPolicySets() {
+ return policySets;
+ }
+
+ public URI getTargetNamespace() {
+ return targetNamespace;
+ }
+
+ public void setTargetNamespace(URI ns) {
+ this.targetNamespace = ns;
+ }
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org