diff options
author | Guo Ruijing <ruijing.guo@intel.com> | 2017-07-31 08:47:35 +0000 |
---|---|---|
committer | Pamela Dragosh <pdragosh@research.att.com> | 2017-07-31 15:51:10 -0400 |
commit | 073cc188efe9abb4c010cf674e34e2cf46ef1c52 (patch) | |
tree | 155c23fbdf3a838ecb5f4183fc3bb6b09aac41eb /ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api | |
parent | 4ca818fdfb9b807562166800a086b413593d6894 (diff) |
[POLICY-73] replace openecomp for policy-engine
Change-Id: I54072f6bcd388c0e05562614ee89b4ae7ad67004
Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api')
6 files changed, 0 insertions, 308 deletions
diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/XACMLErrorConstants.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/XACMLErrorConstants.java deleted file mode 100644 index 5a2eac109..000000000 --- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/XACMLErrorConstants.java +++ /dev/null @@ -1,56 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP-XACML - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed 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. - * ============LICENSE_END========================================================= - */ -package org.openecomp.policy.xacml.api; - -/** - * List of Error Classifications - * PE100 - Permissions - * PE200 - System Error (such as availability, timeout, configuration, etc...) - * PE300 - Data Issue( such as request for REST/JSON ) - * PE400 - Schema validation - * PE500 - Process Flow issues - * PE900 - Default/Unknown Errors - * - * - */ -public class XACMLErrorConstants { - //Captures all the errors related to Authentication, Authorizations and Permissions in the PolicyEngine Process - public static final String ERROR_PERMISSIONS = "PE100 - Permissions Error: "; - - //Captures all the errors related to availability, timeout configuration variables, etc... in the PolicyEngine - public static final String ERROR_SYSTEM_ERROR = "PE200 - System Error: "; - - /* - * Captures all the errors related to configuration values from properties files and data from the interfacing System - * like REST/JSON values - */ - public static final String ERROR_DATA_ISSUE = "PE300 - Data Issue: "; - - //Captures all the errors related to the XML schemas and/or REST/JSON structures - public static final String ERROR_SCHEMA_INVALID = "PE400 - Schema validation Error: "; - - //Captures all the errors related to the Process, when data from one Process to another Process does not flow - public static final String ERROR_PROCESS_FLOW = "PE500 - Process Flow Issue: "; - - //Captures all the errors that not related to the list of above error codes - public static final String ERROR_UNKNOWN = "PE900 - Unknown Error: "; - - -} diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/ECOMPPapEngineFactory.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/ECOMPPapEngineFactory.java deleted file mode 100644 index d34d03348..000000000 --- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/ECOMPPapEngineFactory.java +++ /dev/null @@ -1,38 +0,0 @@ -package org.openecomp.policy.xacml.api.pap; - -import java.util.Properties; - -import com.att.research.xacml.api.pap.PAPException; -import com.att.research.xacml.util.FactoryException; -import com.att.research.xacml.util.FactoryFinder; - -public abstract class ECOMPPapEngineFactory{ - - /** - * Creates a new <code>PAPEngineFactory</code> instance using the given class name and the default thread class loader. - * - * @param factoryClassName the <code>String</code> name of the factory class to instantiate - * @return an instance of an object that extends <code>ECOMPPapEngineFactory</code> to use in creating <code>PAPPolicyEngine</code> objects. - */ - public static ECOMPPapEngineFactory newInstance(String factoryClassName) throws FactoryException { - return FactoryFinder.newInstance(factoryClassName, ECOMPPapEngineFactory.class, null, true); - } - - /** - * Creates a new <code>PAPPolicyEngine</code> based on the configured <code>ECOMPPapEngineFactory</code>. - * - * @return a new <code>PAPPolicyEngine</code> - * @throws PAPException - */ - public abstract PAPPolicyEngine newEngine() throws FactoryException, PAPException; - - /** - * Creates a new <code>PAPPolicyEngine</code> based on the configured <code>ECOMPPapEngineFactory</code>. - * - * @return a new <code>PAPPolicyEngine</code> - * @throws PAPException - */ - public abstract PAPPolicyEngine newEngine(Properties properties) throws FactoryException, PAPException; - - -} diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/EcompPAPPolicy.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/EcompPAPPolicy.java deleted file mode 100644 index 79ee08e2e..000000000 --- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/EcompPAPPolicy.java +++ /dev/null @@ -1,89 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP-XACML - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed 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. - * ============LICENSE_END========================================================= - */ -package org.openecomp.policy.xacml.api.pap; - -import java.net.URI; -import java.util.List; -import java.util.Map; - -import org.openecomp.policy.xacml.std.pap.StdPAPPolicy; - -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonTypeInfo; -import com.fasterxml.jackson.annotation.JsonSubTypes.Type; - -/* - * The following allows us to use Jackson to convert sub-types of this type into JSON and back to objects. - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "PAPPolicyType") -@JsonSubTypes({ - @Type(value = StdPAPPolicy.class, name = "StdPAPPolicy") }) -public interface EcompPAPPolicy { - - public String getPolicyName(); - public String getOldPolicyFileName(); - public String getPolicyDescription(); - public String getEcompName(); - public String getConfigName(); - public Map<String, String> getDynamicFieldConfigAttributes(); - public Map<String, String> getDynamicSettingsMap(); - public List<String> getDynamicRuleAlgorithmLabels(); - public List<String> getDynamicRuleAlgorithmCombo(); - public List<String> getDynamicRuleAlgorithmField1(); - public List<String> getDynamicRuleAlgorithmField2(); - public List<Object> getDynamicVariableList(); - public List<String> getDataTypeList(); - public String getConfigBodyData(); - public String getPolicyID(); - public String getRuleID(); - public String getConfigType(); - public Boolean isEditPolicy(); - public Boolean isDraft(); - public String getVersion(); - public String getDomainDir(); - public String getConfigPolicyType(); - public String getJsonBody(); - public Integer getHighestVersion(); - public URI getLocation(); - public String getActionPerformer(); - public String getActionAttribute(); - public String getActionBody(); - public Map<String, String> getDropDownMap(); - public String getActionDictHeader(); - public String getActionDictType(); - public String getActionDictUrl(); - public String getActionDictMethod(); - public String getServiceType(); - public String getUuid(); - public String getMsLocation(); - public String getPriority(); - public String getDeleteCondition(); - public String getDictionaryType(); - public String getDictionary(); - public String getDictionaryFields(); - - public String getRiskLevel(); - public String getGuard(); - public String getRiskType(); - public String getTTLDate(); -} diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/EcompPDP.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/EcompPDP.java deleted file mode 100644 index ecb21aa09..000000000 --- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/EcompPDP.java +++ /dev/null @@ -1,44 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP-XACML - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed 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. - * ============LICENSE_END========================================================= - */ -package org.openecomp.policy.xacml.api.pap; - -import org.openecomp.policy.xacml.std.pap.StdPDP; - -import com.att.research.xacml.api.pap.PDP; -import com.fasterxml.jackson.annotation.JsonSubTypes; -import com.fasterxml.jackson.annotation.JsonSubTypes.Type; -import com.fasterxml.jackson.annotation.JsonTypeInfo; - -/* - * The following allows us to use Jackson to convert sub-types of this type into JSON and back to objects. - */ -@JsonTypeInfo( - use = JsonTypeInfo.Id.NAME, - include = JsonTypeInfo.As.PROPERTY, - property = "PDPType") -@JsonSubTypes({ - @Type(value = StdPDP.class, name = "StdPDP") }) -public interface EcompPDP extends PDP { - - public Integer getJmxPort(); - - public void setJmxPort(Integer jmxport); - -} diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/EcompPDPGroup.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/EcompPDPGroup.java deleted file mode 100644 index 4aa7cbf64..000000000 --- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/EcompPDPGroup.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.openecomp.policy.xacml.api.pap; - -import java.util.Set; - -import com.att.research.xacml.api.pap.PDPGroup; -import com.att.research.xacml.api.pap.PDPPolicy; - -public interface EcompPDPGroup extends PDPGroup { - - public Set<EcompPDP> getEcompPdps(); - - public Set<PDPPolicy> getSelectedPolicies(); - - public String getOperation(); -} diff --git a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/PAPPolicyEngine.java b/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/PAPPolicyEngine.java deleted file mode 100644 index 0c5c334da..000000000 --- a/ECOMP-XACML/src/main/java/org/openecomp/policy/xacml/api/pap/PAPPolicyEngine.java +++ /dev/null @@ -1,66 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP-XACML - * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. - * ================================================================================ - * Licensed 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. - * ============LICENSE_END========================================================= - */ -package org.openecomp.policy.xacml.api.pap; - -import java.io.InputStream; -import java.util.Set; - -import com.att.research.xacml.api.pap.PAPException; -import com.att.research.xacml.api.pap.PDPPolicy; -import com.att.research.xacml.api.pap.PDPStatus; - -public interface PAPPolicyEngine{ - - public EcompPDPGroup getDefaultGroup() throws PAPException; - - public void SetDefaultGroup(EcompPDPGroup group) throws PAPException; - - public void newPDP(String id, EcompPDPGroup group, String name, String description, int jmxport) throws PAPException, NullPointerException; - - public void newGroup(String name, String description) throws PAPException, NullPointerException; - - public EcompPDPGroup getGroup(String id) throws PAPException; - - public Set<EcompPDPGroup> getEcompPDPGroups() throws PAPException; - - public EcompPDPGroup getPDPGroup(EcompPDP pdp) throws PAPException; - - public PDPStatus getStatus(EcompPDP pdp) throws PAPException; - - public void movePDP(EcompPDP pdp, EcompPDPGroup newGroup) throws PAPException; - - public void updatePDP(EcompPDP pdp) throws PAPException; - - public void removePDP(EcompPDP pdp) throws PAPException; - - public EcompPDP getPDP(String pdpId) throws PAPException; - - public void updateGroup(EcompPDPGroup group) throws PAPException; - - public void removeGroup(EcompPDPGroup group, EcompPDPGroup newGroup) throws PAPException, NullPointerException; - -public void publishPolicy(String id, String name, boolean isRoot, InputStream policy, EcompPDPGroup group) throws PAPException; - - // copy the given policy file into the group's directory, but do not include the policy in the group's policy set - public void copyPolicy(PDPPolicy policy, EcompPDPGroup group) throws PAPException; - - public void removePolicy(PDPPolicy policy, EcompPDPGroup group) throws PAPException; - -} |