From 073cc188efe9abb4c010cf674e34e2cf46ef1c52 Mon Sep 17 00:00:00 2001 From: Guo Ruijing Date: Mon, 31 Jul 2017 08:47:35 +0000 Subject: [POLICY-73] replace openecomp for policy-engine Change-Id: I54072f6bcd388c0e05562614ee89b4ae7ad67004 Signed-off-by: Guo Ruijing Signed-off-by: Pamela Dragosh --- .../org/openecomp/policy/api/LoadedPolicy.java | 57 -------------- .../openecomp/policy/api/NotificationHandler.java | 34 -------- .../org/openecomp/policy/api/NotificationType.java | 58 -------------- .../org/openecomp/policy/api/PDPNotification.java | 52 ------------- .../org/openecomp/policy/api/PEDependency.java | 90 ---------------------- .../org/openecomp/policy/api/RemovedPolicy.java | 41 ---------- .../java/org/openecomp/policy/api/UpdateType.java | 54 ------------- 7 files changed, 386 deletions(-) delete mode 100644 PolicyEngineUtils/src/main/java/org/openecomp/policy/api/LoadedPolicy.java delete mode 100644 PolicyEngineUtils/src/main/java/org/openecomp/policy/api/NotificationHandler.java delete mode 100644 PolicyEngineUtils/src/main/java/org/openecomp/policy/api/NotificationType.java delete mode 100644 PolicyEngineUtils/src/main/java/org/openecomp/policy/api/PDPNotification.java delete mode 100644 PolicyEngineUtils/src/main/java/org/openecomp/policy/api/PEDependency.java delete mode 100644 PolicyEngineUtils/src/main/java/org/openecomp/policy/api/RemovedPolicy.java delete mode 100644 PolicyEngineUtils/src/main/java/org/openecomp/policy/api/UpdateType.java (limited to 'PolicyEngineUtils/src/main/java/org/openecomp/policy/api') diff --git a/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/LoadedPolicy.java b/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/LoadedPolicy.java deleted file mode 100644 index 574580bac..000000000 --- a/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/LoadedPolicy.java +++ /dev/null @@ -1,57 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PolicyEngineUtils - * ================================================================================ - * 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; -/** - * LoadedPolicy defines the Policy that has been Loaded into the PDP. - * - * @version 0.2 - */ -public interface LoadedPolicy { - /** - * Gets the String format of the Policy Name that has been Loaded into the PDP. - * - * @return String format of Policy Name - */ - public String getPolicyName(); - - /** - * Gets the String format of the Policy Version that has been Loaded into the PDP. - * - * @return String format of the Policy Version. - */ - public String getVersionNo(); - - /** - * Gets the Map of String,String format of the Matches if the policy Loaded is of Config Type. - * - * @return the Map of String,String format of the matches in the policy. - */ - public Map getMatches(); - - /** - * Gets the UpdateType of {@link org.openecomp.policy.api.UpdateType} received. - * - * @return UpdateType associated with this PDPNotification - */ - public UpdateType getUpdateType(); -} diff --git a/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/NotificationHandler.java b/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/NotificationHandler.java deleted file mode 100644 index 9661b72f1..000000000 --- a/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/NotificationHandler.java +++ /dev/null @@ -1,34 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PolicyEngineUtils - * ================================================================================ - * 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; -/** - * Defines the methods which need to run when an Event or Notification is received. - * - * @version 0.1 - */ -public interface NotificationHandler { - /** - * notificationReceived method will be triggered automatically whenever a Notification is received by the PEP. - * - * @param notification PDPNotification of {@link org.openecomp.policy.api.PDPNotification} is the object that has information of the notification. - */ - public void notificationReceived(PDPNotification notification); -} diff --git a/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/NotificationType.java b/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/NotificationType.java deleted file mode 100644 index 8bd5bc8db..000000000 --- a/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/NotificationType.java +++ /dev/null @@ -1,58 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PolicyEngineUtils - * ================================================================================ - * 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; - -/** - * Enumeration of the Update Type that has occurred in the PDPNotification of - * {@link org.openecomp.policy.api.PDPNotification} - * - * @version 0.1 - */ -public enum NotificationType { - /** - * Indicates that a policy has been updated - */ - UPDATE("update"), - /** - * Indicates that a policy has been removed - */ - REMOVE("remove"), - /** - * Indicates that both update and removal of policy events has occurred. - */ - BOTH("both") - ; - - private String name; - - private NotificationType(String name){ - this.name = name; - } - - /** - * Returns the String format of the Type for this UpdateType - * @return the String Type of UpdateType - */ - @Override - public String toString(){ - return this.name; - } -} diff --git a/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/PDPNotification.java b/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/PDPNotification.java deleted file mode 100644 index 18da617cf..000000000 --- a/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/PDPNotification.java +++ /dev/null @@ -1,52 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PolicyEngineUtils - * ================================================================================ - * 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.Collection; - -/** - * Defines the Notification event sent from PDP to Client PEP. - * - * @version 0.2 - */ -public interface PDPNotification { - /** - * Gets the Collection of {@link org.openecomp.policy.api.RemovedPolicy} objects received. - * - * @return the Collection which consists of RemovedPolicy objects. - */ - public Collection getRemovedPolicies(); - - /** - * Gets the Collection of {@link org.openecomp.policy.api.LoadedPolicy} objects receieved. - * - * @return the Collection which consists of UpdatedPolicy objects. - */ - public Collection getLoadedPolicies(); - - /** - * Gets the NotificationType of {@link org.openecomp.policy.api.NotificationType} received. - * - * @return NotificationType associated with this PDPNotification - */ - public NotificationType getNotificationType(); - -} diff --git a/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/PEDependency.java b/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/PEDependency.java deleted file mode 100644 index 214174197..000000000 --- a/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/PEDependency.java +++ /dev/null @@ -1,90 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PolicyEngineUtils - * ================================================================================ - * 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 org.apache.maven.model.Dependency; -import org.apache.maven.model.Exclusion; - -public class PEDependency{ - - private String groupId; - private String artifactId; - private String version; - private String classifier; - private String type; - private String scope; - private java.util.List exclusions; - - public String getGroupId() { - return groupId; - } - public void setGroupId(String groupId) { - this.groupId = groupId; - } - public String getArtifactId() { - return artifactId; - } - public void setArtifactId(String artifactId) { - this.artifactId = artifactId; - } - public String getVersion() { - return version; - } - public void setVersion(String version) { - this.version = version; - } - public java.util.List getExclusions() { - return exclusions; - } - public void setExclusions(java.util.List exclusions) { - this.exclusions = exclusions; - } - public String getClassifier() { - return classifier; - } - public void setClassifier(String classifier) { - this.classifier = classifier; - } - public String getType() { - return type; - } - public void setType(String type) { - this.type = type; - } - public String getScope() { - return scope; - } - public void setScope(String scope) { - this.scope = scope; - } - - public Dependency getDependency(){ - Dependency dependency = new Dependency(); - dependency.setArtifactId(artifactId); - dependency.setGroupId(groupId); - dependency.setVersion(version); - dependency.setExclusions(exclusions); - dependency.setClassifier(classifier); - dependency.setScope(scope); - dependency.setType(type); - return dependency; - } -} diff --git a/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/RemovedPolicy.java b/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/RemovedPolicy.java deleted file mode 100644 index b94fdce42..000000000 --- a/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/RemovedPolicy.java +++ /dev/null @@ -1,41 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PolicyEngineUtils - * ================================================================================ - * 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; -/** - * RemovedPolicy defines the Policy that has been removed - * - * @version 0.1 - */ -public interface RemovedPolicy { - /** - * Gets the String format of the Policy Name that has been removed. - * - * @return String format of Policy Name - */ - public String getPolicyName(); - - /** - * Gets the String format of the Policy Version that has been removed. - * - * @return String format of Policy Version - */ - public String getVersionNo(); -} diff --git a/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/UpdateType.java b/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/UpdateType.java deleted file mode 100644 index d48121b69..000000000 --- a/PolicyEngineUtils/src/main/java/org/openecomp/policy/api/UpdateType.java +++ /dev/null @@ -1,54 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * PolicyEngineUtils - * ================================================================================ - * 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; - -/** - * Enumeration of the Update Type that has occurred in the UpdatedPolicy of - * {@link org.openecomp.policy.api.LoadedPolicy} - * - * @version 0.1 - */ -public enum UpdateType { - /** - * Indicates that a policy has been updated - */ - UPDATE("update"), - /** - * Indicates that a policy is new - */ - NEW("new") - ; - - private String name; - - private UpdateType(String name){ - this.name = name; - } - - /** - * Returns the String format of the Type for this UpdateType - * @return the String Type of UpdateType - */ - @Override - public String toString(){ - return this.name; - } -} -- cgit 1.2.3-korg