From 91d04c64771832a0b8815ffbe1f0f9920320d94d Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Tue, 14 Feb 2017 19:41:00 -0500 Subject: Initial OpenECOMP policy/engine commit Change-Id: I7dbff37733b661643dd4d1caefa3d7dccc361b6e Signed-off-by: Pamela Dragosh --- .../org/openecomp/policy/api/PolicyConfig.java | 123 +++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 PolicyEngineAPI/src/main/java/org/openecomp/policy/api/PolicyConfig.java (limited to 'PolicyEngineAPI/src/main/java/org/openecomp/policy/api/PolicyConfig.java') diff --git a/PolicyEngineAPI/src/main/java/org/openecomp/policy/api/PolicyConfig.java b/PolicyEngineAPI/src/main/java/org/openecomp/policy/api/PolicyConfig.java new file mode 100644 index 000000000..5cb7d8176 --- /dev/null +++ b/PolicyEngineAPI/src/main/java/org/openecomp/policy/api/PolicyConfig.java @@ -0,0 +1,123 @@ +/*- + * ============LICENSE_START======================================================= + * PolicyEngineAPI + * ================================================================================ + * 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.api; + +import java.util.Map; +import java.util.Properties; + +import javax.json.JsonObject; + +import org.w3c.dom.Document; +/** + * Defines the objects that represent PolicyEngine config elements. PolicyConfig communicates the PolicyConfigStatus, + * PolicyConfigMessage, PolicyType, Properties, JsonObject, String and Document. + * + * @version 0.7 + */ + +public interface PolicyConfig { + /** + * Gets the {@link org.openecomp.policy.api.PolicyType} associated with PolicyConfig + * + * @return the PolicyType associated with this PolicyConfig + */ + public PolicyType getType(); + + /** + * Gives the Properties response associated with the PolicyConfig + * + * @return the Properties associated with this PolicyConfig + */ + public Properties toProperties(); + + /** + * Gives the JsonObject response associated with the PolicyConfig + * + * @return the JsonObject result associated with PolicyConfig + */ + public JsonObject toJSON(); + + /** + * Gives the XML Document result associated with PolicyConfig + * + * @return the Document result associated with PolicyConfig + */ + public Document toXML(); + + /** + * Gives the Other String response associated with PolicyConfig + * + * @return the String result associated with PolicyConfig + */ + public String toOther(); + + /** + * Gets the {@link org.openecomp.policy.api.PolicyConfigStatus} associated with this PolicyConfig. + * + * @return the PolicyConfigStatus associated with this PolicyConfig + */ + public PolicyConfigStatus getPolicyConfigStatus(); + + /** + * Gets the String of the PolicyConfigMessage from PolicyConfig. + * + * @return the String which consists of PolicyConfigMessage from PolicyConfig + */ + public String getPolicyConfigMessage(); + + /** + * Gets the String of the PolicyName retrieved. + * + * @return the String which consists of Policy Name which has been retrieved. + */ + public String getPolicyName(); + + + /** + * Gets the String of the PolicyVersion retrieved. + * + * @return the String which consists of the Policy Version number which has been retrieved. + */ + public String getPolicyVersion(); + + /** + * Gets the Matching Conditions of the policy retrieved which can be used in the getConfig call. + * + * @return Map of String, String which consists of the Matching conditions of the Policy retrieved. + */ + public Map getMatchingConditions(); + + /** + * Gets the Response Attributes of the policy retrieved. Which can hold additional information about the policy retrieved. + * + * @return Map of String, String which consists of the Response Attributes of the Policy retrieved. + */ + public Map getResponseAttributes(); + + /** + * Returns the String version of the PolicyConfig object. + * + * @return String of the PolicyConfig Object. + */ + @Override + public String toString(); + +} -- cgit 1.2.3-korg