aboutsummaryrefslogtreecommitdiffstats
path: root/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa
diff options
context:
space:
mode:
Diffstat (limited to 'ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa')
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ActionBodyEntity.java195
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ActionList.java103
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ActionPolicyDict.java211
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/AddressGroup.java114
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Attribute.java363
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/AttributeAssignment.java93
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/BRMSController.java154
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/BRMSDependency.java153
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/BRMSParamTemplate.java142
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Category.java218
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ClosedLoopD2Services.java175
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ClosedLoopSite.java177
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ClosedLoops.java99
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConfigurationDataEntity.java224
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConstraintType.java121
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConstraintValue.java116
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DCAEUsers.java102
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DCAEuuid.java102
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DatabaseLockEntity.java47
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Datatype.java244
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DecisionSettings.java235
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DescriptiveScope.java181
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/EcompName.java167
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/EnforcingType.java96
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FWTag.java180
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FWTagPicker.java189
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FirewallDictionaryList.java164
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FunctionArgument.java122
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FunctionDefinition.java219
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GlobalRoleSettings.java93
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GroupEntity.java270
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GroupPolicyScopeList.java111
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GroupServiceList.java104
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceAttribute.java109
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceConfigName.java102
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceLocation.java102
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceModels.java189
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Obadvice.java227
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ObadviceExpression.java123
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PEPOptions.java183
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfigParam.java147
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfiguration.java537
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPResolver.java365
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPResolverParam.java147
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPType.java131
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PdpEntity.java241
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyAlgorithms.java116
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyDBDaoEntity.java150
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyEditorScopes.java159
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyEntity.java308
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyGroupEntity.java60
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyManagement.java162
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyRoles.java102
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeClosedLoop.java100
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeResource.java100
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeService.java100
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeType.java100
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScore.java104
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyVersion.java183
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PortList.java104
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PrefixList.java114
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ProtocolList.java105
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RainyDayTreatments.java118
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RemoteCatalogValues.java102
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RiskType.java172
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RuleAlgorithms.java125
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/SafePolicyWarning.java109
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/SecurityZone.java101
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ServiceList.java154
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/SystemLogDB.java163
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/TermList.java261
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/UserInfo.java76
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VMType.java102
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VNFType.java173
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VSCLAction.java173
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VarbindDictionary.java184
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/WatchPolicyNotificationTable.java80
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Zone.java101
-rw-r--r--ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/package-info.java21
79 files changed, 0 insertions, 12169 deletions
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ActionBodyEntity.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ActionBodyEntity.java
deleted file mode 100644
index bda58b607..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ActionBodyEntity.java
+++ /dev/null
@@ -1,195 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Lob;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Version;
-/*
- * The Entity class to persist a policy object Action Body
- */
-
-import com.fasterxml.jackson.annotation.JsonBackReference;
-
-@Entity
-@Table(name="ActionBodyEntity")
-@NamedQueries({
- @NamedQuery(name=" ActionBodyEntity.findAll", query="SELECT e FROM ActionBodyEntity e "),
- @NamedQuery(name="ActionBodyEntity.deleteAll", query="DELETE FROM ActionBodyEntity WHERE 1=1")
-})
-
-public class ActionBodyEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="actionBodyId")
- @JsonBackReference
- private long actionBodyId;
-
- @Column(name="actionBodyName", nullable=false, length=255)
- private String actionBodyName = "";
-
- @Version
- @Column(name="version")
- private int version;
-
- @Lob
- @Column(name="actionBody", nullable=false, columnDefinition="TEXT")
- private String actionBody = "NoBody";
-
- @Column(name="created_by", nullable=false, length=255)
- private String createdBy = "guest";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Column(name="modified_by", nullable=false, length=255)
- private String modifiedBy = "guest";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @Column(name="deleted", nullable=false)
- private boolean deleted = false;
-
- public ActionBodyEntity() {
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- }
- /**
- * @return the configurationDataId
- */
- public long getActionBodyId() {
- return actionBodyId;
- }
- /**
- * @param configurationDataId the configurationDataId to set
- */
- public void setActionBodyName(String name) {
- this.actionBodyName = name;
- }
- public String getActionBodyName(){
- return this.actionBodyName;
- }
-
- /**
- * @return the actionBody
- */
- public String getActionBody() {
- return actionBody;
- }
- /**
- * @param configBody the configBody to set
- */
- public void setActionBody(String body) {
- this.actionBody = body;
- }
- /**
- * @return the createdBy
- */
- public String getCreatedBy() {
- return createdBy;
- }
- /**
- * @param createdBy the createdBy to set
- */
- public void setCreatedBy(String createdBy) {
- this.createdBy = createdBy;
- }
-
- /**
- * @return the modifiedBy
- */
- public String getModifiedBy() {
- return modifiedBy;
- }
- /**
- * @param modifiedBy the modifiedBy to set
- */
- public void setModifiedBy(String modifiedBy) {
- this.modifiedBy = modifiedBy;
- }
- /**
- * @return the modifiedDate
- */
- public Date getModifiedDate() {
- return modifiedDate;
- }
- /**
- * @param modifiedDate the modifiedDate to set
- */
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
- /**
- * @return the version
- */
- public int getVersion() {
- return version;
- }
- /**
- * @return the createdDate
- */
- public Date getCreatedDate() {
- return createdDate;
- }
-
- /**
- * @return the deleted
- */
- public boolean isDeleted() {
- return deleted;
- }
-
- /**
- * @param deleted the deleted to set
- */
- public void setDeleted(boolean deleted) {
- this.deleted = deleted;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ActionList.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ActionList.java
deleted file mode 100644
index 0fea71a1c..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ActionList.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="actionlist")
-@NamedQuery(name="ActionList.findAll", query="SELECT e FROM ActionList e ")
-public class ActionList implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="actionname", nullable=false)
- @OrderBy("asc")
- private String actionName;
-
- @Column(name="description")
- private String description;
-/*
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;*/
-
- public ActionList() {
-
- }
- public ActionList(String string, String userid) {
- this(domain);
-
- }
- public ActionList(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
- public String getActionName() {
- return this.actionName;
- }
-
- public void setActionName(String actionName) {
- this.actionName = actionName;
-
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ActionPolicyDict.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ActionPolicyDict.java
deleted file mode 100644
index f6c8965d2..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ActionPolicyDict.java
+++ /dev/null
@@ -1,211 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-
-@Entity
-@Table(name="ActionPolicyDict")
-@NamedQueries({
- @NamedQuery(name="ActionPolicyDict.findAll", query="SELECT e FROM ActionPolicyDict e")
-})
-public class ActionPolicyDict implements Serializable {
- private static final long serialVersionUID = 1L;
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="ATTRIBUTE_NAME", nullable=false)
- @OrderBy("asc")
- private String attributeName;
-
- @Column(name="Type", nullable=false)
- @OrderBy("asc")
- private String type;
-
- @Column(name="URL", nullable=false)
- @OrderBy("asc")
- private String url;
-
- @Column(name="Method", nullable=false)
- @OrderBy("asc")
- private String method;
-
- @Column(name="Headers", nullable=true)
- @OrderBy("asc")
- private String header;
-
- @Column(name="Body", nullable=true)
- @OrderBy("asc")
- private String body;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- private static Log logger = LogFactory.getLog(ActionPolicyDict.class);
- public ActionPolicyDict() {
-
- }
-
- public ActionPolicyDict(String string, String userid) {
- this(string);
- }
-
- public ActionPolicyDict(String domain) {
- this.type = domain;
- }
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy =XacmlAdminAuthorization.getUserId();;
- } catch (Exception e) {
- logger.error("Exception caused While adding Modified by Role"+e);
- //PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "ActionPolicyDict", "Exception caused While adding Modified by Role");
- }
- }
- public int getId() {
- return this.id;
- }
- public void setId(int id) {
- this.id = id;
- }
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
- public String getDescription() {
- return this.description;
- }
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
- public String getType() {
- return type;
- }
- public void setType(String type) {
- this.type = type;
- }
-
- public String getUrl() {
- return url;
- }
- public void setUrl(String url) {
- this.url = url;
- }
- public String getMethod() {
- return method;
- }
- public void setMethod(String method) {
- this.method = method;
- }
- public String getHeader() {
- return header;
- }
- public void setHeader(String header) {
- this.header = header;
- }
-
- public String getBody() {
- return body;
- }
- public void setBody(String body) {
- this.body = body;
- }
- public String getAttributeName() {
- return attributeName;
- }
- public void setAttributeName(String attributeName) {
- this.attributeName = attributeName;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/AddressGroup.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/AddressGroup.java
deleted file mode 100644
index 1b6430c21..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/AddressGroup.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="AddressGroup")
-@NamedQuery(name="AddressGroup.findAll", query="SELECT e FROM AddressGroup e ")
-public class AddressGroup implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="prefixlist")
- private String prefixList;
-
-
- @Column(name="description")
- private String description;
-
- public AddressGroup() {
-
- }
- public AddressGroup(String string, String userid) {
- this(domain);
-
- }
- public AddressGroup(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getGroupName() {
- return this.name;
- }
-
- public void setGroupName(String serviceName) {
- this.name = serviceName;
-
- }
-
- public String getPrefixList() {
- return this.prefixList;
- }
-
- public void setServiceList(String prefixList) {
- this.prefixList = prefixList;
-
- }
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
-
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Attribute.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Attribute.java
deleted file mode 100644
index f9d60ff4d..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Attribute.java
+++ /dev/null
@@ -1,363 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Transient;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-/**
- * The persistent class for the Attribute database table.
- *
- */
-@Entity
-@Table(name="Attribute")
-@NamedQuery(name="Attribute.findAll", query="SELECT a FROM Attribute a order by a.priority asc, a.xacmlId asc")
-public class Attribute implements Serializable {
- private static final long serialVersionUID = 1L;
- private static final Log logger = LogFactory.getLog(Attribute.class);
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- //bi-directional many-to-one association to Category
- @ManyToOne
- @JoinColumn(name="constraint_type", nullable=true)
- @JsonIgnore
- private ConstraintType constraintType;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @Column(name="PRIORITY", nullable=true)
- @OrderBy("asc")
- private String priority;
-
- @Column(name="ATTRIBUTE_VALUE", nullable=true)
- @OrderBy("asc")
- private String attributeValue;
-
- @Column(name="xacml_id", unique = true, nullable=false)
- @OrderBy("asc")
- private String xacmlId = "urn";
-
- //bi-directional many-to-one association to ConstraintValue
- @OneToMany(mappedBy="attribute", orphanRemoval=true, cascade=CascadeType.REMOVE)
- @JsonIgnore
- private Set<ConstraintValue> constraintValues = new HashSet<>();
-
- //bi-directional many-to-one association to Category
- @ManyToOne
- @JoinColumn(name="category")
- @JsonIgnore
- private Category categoryBean;
-
- //bi-directional many-to-one association to Datatype
- @ManyToOne
- @JoinColumn(name="datatype")
- private Datatype datatypeBean;
-
- @Column(name="is_designator", nullable=false)
- @JsonIgnore
- private char isDesignator = '1';
-
- @Column(name="selector_path", nullable=true, length=2048)
- private String selectorPath;
-
-
-
- @Transient
- private String issuer = null;
-
- @Transient
- private boolean mustBePresent = false;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
-
- public Attribute() {
- }
-
- public Attribute(String domain) {
- this.xacmlId = domain;
- }
-
- public Attribute(Attribute copy) {
- this(copy.getXacmlId() + ":(0)");
- this.constraintType = copy.getConstraintType();
- this.categoryBean = copy.getCategoryBean();
- this.datatypeBean = copy.getDatatypeBean();
- this.description = copy.getDescription();
- for (ConstraintValue value : copy.getConstraintValues()) {
- ConstraintValue newValue = new ConstraintValue(value);
- newValue.setAttribute(this);
- this.addConstraintValue(newValue);
- }
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy = XacmlAdminAuthorization.getUserId();
- } catch (Exception e) {
- logger.error("Exception caused While adding Modified by Role"+e);
- }
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public ConstraintType getConstraintType() {
- return this.constraintType;
- }
-
- public void setConstraintType(ConstraintType constraintType) {
- this.constraintType = constraintType;
- }
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
- public String getXacmlId() {
- return this.xacmlId;
- }
-
-/* @Transient
- public Identifier getXacmlIdentifier() {
- return new IdentifierImpl(this.xacmlId);
- }*/
-
- public void setXacmlId(String xacmlId) {
- this.xacmlId = xacmlId;
- }
-
- public Set<ConstraintValue> getConstraintValues() {
- return this.constraintValues;
- }
-
- public void setConstraintValues(Set<ConstraintValue> constraintValues) {
- for (ConstraintValue value : this.constraintValues) {
- value.setAttribute(this);
- }
- this.constraintValues = constraintValues;
- }
-
- public ConstraintValue addConstraintValue(ConstraintValue constraintValue) {
- if (this.constraintValues == null) {
- this.constraintValues = new HashSet<>();
- }
- this.constraintValues.add(constraintValue);
- constraintValue.setAttribute(this);
-
- return constraintValue;
- }
-
- public ConstraintValue removeConstraintValue(ConstraintValue constraintValue) {
- this.constraintValues.remove(constraintValue);
- constraintValue.setAttribute(null);
-
- return constraintValue;
- }
-
- public void removeAllConstraintValues() {
- if (this.constraintValues == null) {
- return;
- }
- for (ConstraintValue value : this.constraintValues) {
- value.setAttribute(null);
- }
- this.constraintValues.clear();
- }
-
- public Category getCategoryBean() {
- return this.categoryBean;
- }
-
- public void setCategoryBean(Category categoryBean) {
- this.categoryBean = categoryBean;
- }
-
- public Datatype getDatatypeBean() {
- return this.datatypeBean;
- }
-
- public void setDatatypeBean(Datatype datatypeBean) {
- this.datatypeBean = datatypeBean;
- }
-
- public char getIsDesignator() {
- return this.isDesignator;
- }
-
- public void setIsDesignator(char is) {
- this.isDesignator = is;
- }
-
- public String getSelectorPath() {
- return this.selectorPath;
- }
-
- public void setSelectorPath(String path) {
- this.selectorPath = path;
- }
-
- @Transient
- public String getIssuer() {
- return issuer;
- }
-
- @Transient
- public void setIssuer(String issuer) {
- this.issuer = issuer;
- }
-
- @Transient
- public boolean isMustBePresent() {
- return mustBePresent;
- }
-
- @Transient
- public void setMustBePresent(boolean mustBePresent) {
- this.mustBePresent = mustBePresent;
- }
-
- @Transient
- public boolean isDesignator() {
- return (this.isDesignator == '1');
- }
-
- @Transient
- public void setIsDesignator(boolean is) {
- if (is) {
- this.isDesignator = '1';
- } else {
- this.isDesignator = '0';
- }
- }
-
- public String getPriority() {
- return priority;
- }
-
- public void setPriority(String priority) {
- this.priority = priority;
- }
-
- public String getAttributeValue() {
- return attributeValue;
- }
-
- public void setAttributeValue(String attributeValue) {
- this.attributeValue = attributeValue;
- }
-}
-
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/AttributeAssignment.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/AttributeAssignment.java
deleted file mode 100644
index 1e81213d3..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/AttributeAssignment.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
-
-
-/**
- * The persistent class for the ObadviceExpressions database table.
- *
- */
-@Entity
-@Table(name="AttributeAssignment")
-@NamedQuery(name="AttributeAssignment.findAll", query="SELECT a FROM AttributeAssignment a")
-public class AttributeAssignment implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public static final String EXPRESSION_APPLY = "Apply";
- public static final String EXPRESSION_SELECTOR = "AttributeSelector";
- public static final String EXPRESSION_VALUE = "AttributeValue";
- public static final String EXPRESSION_FUNCTION = "Function";
- public static final String EXPRESSION_REFERENCE = "VarableReference";
- public static final String EXPRESSION_DESIGNATOR = "AttributeDesignator";
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="attribute_id")
- private int attributeId;
-
- //bi-directional many-to-one association to Obadvice
- @Column(name="expression", nullable=false)
- private String expression;
-
- //bi-directional many-to-one association to Obadvice
- @ManyToOne
- private Obadvice obadvice;
-
- public AttributeAssignment() {
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public int getAttributeId() {
- return this.attributeId;
- }
-
- public void setAttributeId(int attributeId) {
- this.attributeId = attributeId;
- }
-
- public String getExpression() {
- return expression;
- }
-
- public void setExpression(String expression) {
- this.expression = expression;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/BRMSController.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/BRMSController.java
deleted file mode 100644
index afa6d94cf..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/BRMSController.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-@Entity
-@Table(name="BRMSController")
-@NamedQuery(name="BRMSController.findAll", query="SELECT b from BRMSController b ")
-public class BRMSController implements Serializable{
- private static final long serialVersionUID = -8666947569754164177L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="controller_name", nullable=false, length=1024, unique=true)
- @OrderBy("asc")
- private String controllerName;
-
- @Column(name="description", nullable=true, length=1024)
- private String description;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- @Column(name="controller", nullable=false)
- private String controller;
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getCreatedDate() {
- return createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public Date getModifiedDate() {
- return modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- public String getController() {
- return controller;
- }
-
- public void setController(String controller) {
- this.controller = controller;
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getControllerName() {
- return controllerName;
- }
-
- public void setControllerName(String controllerName) {
- this.controllerName = controllerName;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/BRMSDependency.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/BRMSDependency.java
deleted file mode 100644
index 9c4406948..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/BRMSDependency.java
+++ /dev/null
@@ -1,153 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-@Entity
-@Table(name="BRMSDependency")
-@NamedQuery(name="BRMSDependency.findAll", query="SELECT b from BRMSDependency b ")
-public class BRMSDependency implements Serializable{
- private static final long serialVersionUID = -7005622785653160761L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="dependency_name", nullable=false, length=1024, unique=true)
- @OrderBy("asc")
- private String dependencyName;
-
- @Column(name="description", nullable=true, length=1024)
- private String description;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- @Column(name="dependency", nullable=false)
- private String dependency;
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getCreatedDate() {
- return createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public Date getModifiedDate() {
- return modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- public String getDependency() {
- return dependency;
- }
-
- public void setDependency(String dependency) {
- this.dependency = dependency;
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getDependencyName() {
- return dependencyName;
- }
-
- public void setDependencyName(String dependencyName) {
- this.dependencyName = dependencyName;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/BRMSParamTemplate.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/BRMSParamTemplate.java
deleted file mode 100644
index 54661de0c..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/BRMSParamTemplate.java
+++ /dev/null
@@ -1,142 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.Lob;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.openecomp.policy.rest.jpa.UserInfo;
-
-/*
- * JPA for the BRMS Param Template.
- *
- * @version: 0.1
- */
-
-
-@Entity
-@Table(name="BRMSParamTemplate")
-@NamedQuery(name="BRMSParamTemplate.findAll", query="SELECT b FROM BRMSParamTemplate b ")
-public class BRMSParamTemplate implements Serializable{
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="param_template_name", nullable=false, unique=true)
- @OrderBy("asc")
- private String ruleName;
-
- @Lob
- @Column(name="rule",nullable=false)
- private String rule;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public BRMSParamTemplate(){
- }
-
- public BRMSParamTemplate(String userid){
-
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getRule(){
- return this.rule;
- }
-
- public void setRule(String rule){
- this.rule = rule;
- }
-
- public String getRuleName(){
- return this.ruleName;
- }
-
- public void setRuleName(String ruleName){
- this.ruleName = ruleName;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Category.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Category.java
deleted file mode 100644
index 1f4243304..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Category.java
+++ /dev/null
@@ -1,218 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-import com.att.research.xacml.api.Identifier;
-import com.att.research.xacml.api.XACML3;
-import com.att.research.xacml.std.IdentifierImpl;
-import com.fasterxml.jackson.annotation.JsonBackReference;
-
-
-/**
- * The persistent class for the Categories database table.
- *
- */
-@Entity
-@Table(name="Category")
-@NamedQuery(name="Category.findAll", query="SELECT c FROM Category c")
-public class Category implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public static final char STANDARD = 'S';
- public static final char CUSTOM = 'C';
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="grouping", nullable=false, length=64)
- private String grouping;
-
- @Column(name="is_standard", nullable=false)
- private char isStandard;
-
- @Column(name="xacml_id", nullable=false, unique=true, length=255)
- private String xacmlId;
-
- @Column(name="short_name", nullable=false, length=64)
- private String shortName;
-
- //bi-directional many-to-one association to Attribute
- @OneToMany(mappedBy="categoryBean")
- @JsonBackReference
- private Set<Attribute> attributes = new HashSet<>();
-
- public Category() {
- this.xacmlId = XACML3.ID_SUBJECT_CATEGORY_ACCESS_SUBJECT.stringValue();
- this.grouping = "subject";
- this.isStandard = Category.STANDARD;
- this.shortName = "subject";
- }
-
- public Category(Identifier cat, String grouping, char isStandard) {
- if (cat != null) {
- this.xacmlId = cat.stringValue();
- }
- this.isStandard = isStandard;
- if (grouping != null) {
- this.grouping = grouping;
- } else {
- this.grouping = Category.extractGrouping(this.xacmlId);
- }
- }
-
- public Category(Identifier cat, String grouping) {
- this(cat, grouping, Category.STANDARD);
- }
-
- public Category(Identifier cat, char standard) {
- this(cat, null, standard);
- }
-
- public Category(Identifier cat) {
- this(cat, Category.STANDARD);
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getGrouping() {
- return this.grouping;
- }
-
- public void setGrouping(String grouping) {
- this.grouping = grouping;
- }
-
- public char getIsStandard() {
- return this.isStandard;
- }
-
- public void setIsStandard(char isStandard) {
- this.isStandard = isStandard;
- }
-
- public String getXacmlId() {
- return this.xacmlId;
- }
-
- public void setXacmlId(String xacmlId) {
- this.xacmlId = xacmlId;
- }
-
- public String getShortName() {
- return this.shortName;
- }
-
- public void setShortName(String shortName) {
- this.shortName = shortName;
- }
-
- public Set<Attribute> getAttributes() {
- return this.attributes;
- }
-
- public void setAttributes(Set<Attribute> attributes) {
- this.attributes = attributes;
- }
-
- public Attribute addAttribute(Attribute attribute) {
- getAttributes().add(attribute);
- attribute.setCategoryBean(this);
-
- return attribute;
- }
-
- public Attribute removeAttribute(Attribute attribute) {
- getAttributes().remove(attribute);
- attribute.setCategoryBean(null);
-
- return attribute;
- }
-
- @Transient
- public boolean isStandard() {
- return (this.isStandard == Category.STANDARD);
- }
-
- @Transient
- public boolean isCustom() {
- return (this.isStandard == Category.CUSTOM);
- }
-
- @Transient
- public static String extractGrouping(String xacmlId) {
- if (xacmlId == null) {
- return null;
- }
- if (xacmlId.matches(".*:attribute\\-category:.*")) {
- String[] parts = xacmlId.split("[:]");
- if (parts != null && parts.length > 0) {
- return parts[parts.length - 1];
- }
- } else if (xacmlId.matches(".*:[a-zA-Z]+[\\-]category:.*")) {
- String[] parts = xacmlId.split("[:]");
- if (parts != null && parts.length > 0) {
- for (String part : parts) {
- int index = part.indexOf("-category");
- if (index > 0) {
- return part.substring(0, index);
- }
- }
- }
- }
- return null;
- }
-
- @Transient
- public Identifier getIdentifer() {
- return new IdentifierImpl(this.xacmlId);
- }
-
- @Transient
- @Override
- public String toString() {
- return "Category [id=" + id + ", grouping=" + grouping
- + ", isStandard=" + isStandard + ", xacmlId=" + xacmlId
- + ", attributes=" + attributes + "]";
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ClosedLoopD2Services.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ClosedLoopD2Services.java
deleted file mode 100644
index 391ed9714..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ClosedLoopD2Services.java
+++ /dev/null
@@ -1,175 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- *
- */
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-
-@Entity
-@Table(name = "ClosedLoopD2Services")
-@NamedQuery(name="ClosedLoopD2Services.findAll", query="SELECT c FROM ClosedLoopD2Services c ")
-public class ClosedLoopD2Services implements Serializable{
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
-
- @Id
- @Column(name ="id")
- @GeneratedValue(strategy = GenerationType.AUTO)
- private int id;
-
- @Column(name="service_Name", nullable=false, unique=true)
- @OrderBy("asc")
- private String serviceName;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- private static Log LOGGER = LogFactory.getLog(ClosedLoopD2Services.class);
-
- public ClosedLoopD2Services(){
-
- }
-
- public ClosedLoopD2Services(String string, String userid) {
- this(domain);
- }
-
- public ClosedLoopD2Services(String domain) {
- this.serviceName = domain;
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy = XacmlAdminAuthorization.getUserId();;
- } catch (Exception e) {
- LOGGER.error("Exception caused While adding Modified by Role"+e);
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "ClosedLoopD2Services", "Exception caused While adding Modified by Role");
- }
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getServiceName() {
- return serviceName;
- }
-
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getCreatedDate() {
- return createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public Date getModifiedDate() {
- return modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ClosedLoopSite.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ClosedLoopSite.java
deleted file mode 100644
index fd8b295b9..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ClosedLoopSite.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-/*
- *
- */
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-
-
-@Entity
-@Table(name = "ClosedLoopSite")
-@NamedQuery(name="ClosedLoopSite.findAll", query="SELECT c FROM ClosedLoopSite c ")
-public class ClosedLoopSite implements Serializable{
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
-
- @Id
- @Column(name ="id")
- @GeneratedValue(strategy = GenerationType.AUTO)
- private int id;
-
- @Column(name="site_Name", nullable=false, unique=true)
- @OrderBy("asc")
- private String siteName;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- private static Log LOGGER = LogFactory.getLog(ClosedLoopSite.class);
-
- public ClosedLoopSite(){
-
- }
-
- public ClosedLoopSite(String string, String userid) {
- this(domain);
- }
-
- public ClosedLoopSite(String domain) {
- this.siteName = domain;
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy = XacmlAdminAuthorization.getUserId();;
- } catch (Exception e) {
- LOGGER.error("Exception caused While adding Modified by Role"+e);
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "ClosedLoopSite", "Exception caused While adding Modified by Role");
- }
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getSiteName() {
- return siteName;
- }
-
- public void setSiteName(String siteName) {
- this.siteName = siteName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getCreatedDate() {
- return createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public Date getModifiedDate() {
- return modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ClosedLoops.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ClosedLoops.java
deleted file mode 100644
index 5732832c6..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ClosedLoops.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="ClosedLoops")
-@NamedQueries({
- @NamedQuery(name="ClosedLoops.findAll", query="SELECT e FROM ClosedLoops e"),
- @NamedQuery(name="ClosedLoops.deleteAll", query="DELETE FROM ClosedLoops WHERE 1=1")
-})
-public class ClosedLoops implements Serializable {
-
- /**
- *
- */
- private static final long serialVersionUID = -7796845092457926842L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="closedLoopControlName", nullable=false, length=255)
- @OrderBy("asc")
- private String closedLoopControlName;
-
- @Column(name="alarmConditions", nullable=true, length=255)
- private String alarmConditions;
-
- @Column(name="yaml", nullable=true, length=1028)
- private String yaml;
-
- public ClosedLoops() {
-
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getClosedLoopControlName() {
- return closedLoopControlName;
- }
-
- public void setClosedLoopControlName(String closedLoopControlName) {
- this.closedLoopControlName = closedLoopControlName;
- }
-
- public String getAlarmConditions() {
- return alarmConditions;
- }
-
- public void setAlarmConditions(String alarmConditions) {
- this.alarmConditions = alarmConditions;
- }
-
- public String getYaml() {
- return yaml;
- }
-
- public void setYaml(String yaml) {
- this.yaml = yaml;
- }
-
-} \ No newline at end of file
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConfigurationDataEntity.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConfigurationDataEntity.java
deleted file mode 100644
index bf42a7788..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConfigurationDataEntity.java
+++ /dev/null
@@ -1,224 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.Lob;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Version;
-/*
- * The Entity class to persist a policy object configuration data
- */
-
-import com.fasterxml.jackson.annotation.JsonBackReference;
-
-@Entity
-@Table(name="ConfigurationDataEntity")
-@NamedQueries({
- @NamedQuery(name="ConfigurationDataEntity.findAll", query="SELECT e FROM ConfigurationDataEntity e "),
- @NamedQuery(name="ConfigurationDataEntity.deleteAll", query="DELETE FROM ConfigurationDataEntity WHERE 1=1")
-})
-
-public class ConfigurationDataEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="configurationDataId")
- @JsonBackReference
- private long configurationDataId;
-
- @Column(name="configurationName", nullable=false, length=255)
- private String configurationName = "";
-
- @Version
- @Column(name="version")
- private int version;
-
- @Column(name="configType", nullable=false, length=255)
- private String configType = "NoType";
-
- @Lob
- @Column(name="configBody", nullable=false, columnDefinition="TEXT")
- private String configBody = "NoBody";
-
- @Column(name="created_by", nullable=false, length=255)
- private String createdBy = "guest";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Column(name="description", nullable=false, length=2048)
- private String description = "NoDescription";
-
- @Column(name="modified_by", nullable=false, length=255)
- private String modifiedBy = "guest";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @Column(name="deleted", nullable=false)
- private boolean deleted = false;
-
- public ConfigurationDataEntity() {
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- }
- /**
- * @return the configurationDataId
- */
- public long getConfigurationDataId() {
- return configurationDataId;
- }
- /**
- * @param configurationDataId the configurationDataId to set
- */
- public void setConfigurationName(String configurationName) {
- this.configurationName = configurationName;
- }
- public String getConfigurationName(){
- return this.configurationName;
- }
- /**
- * @return the configType
- */
- public String getConfigType() {
- return configType;
- }
- /**
- * @param configType the configType to set
- */
- public void setConfigType(String configType) {
- this.configType = configType;
- }
- /**
- * @return the configBody
- */
- public String getConfigBody() {
- return configBody;
- }
- /**
- * @param configBody the configBody to set
- */
- public void setConfigBody(String configBody) {
- this.configBody = configBody;
- }
- /**
- * @return the createdBy
- */
- public String getCreatedBy() {
- return createdBy;
- }
- /**
- * @param createdBy the createdBy to set
- */
- public void setCreatedBy(String createdBy) {
- this.createdBy = createdBy;
- }
- /**
- * @return the description
- */
- public String getDescription() {
- return description;
- }
- /**
- * @param description the description to set
- */
- public void setDescription(String description) {
- this.description = description;
- }
- /**
- * @return the modifiedBy
- */
- public String getModifiedBy() {
- return modifiedBy;
- }
- /**
- * @param modifiedBy the modifiedBy to set
- */
- public void setModifiedBy(String modifiedBy) {
- this.modifiedBy = modifiedBy;
- }
- /**
- * @return the modifiedDate
- */
- public Date getModifiedDate() {
- return modifiedDate;
- }
- /**
- * @param modifiedDate the modifiedDate to set
- */
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
- /**
- * @return the version
- */
- public int getVersion() {
- return version;
- }
- /**
- * @return the createdDate
- */
- public Date getCreatedDate() {
- return createdDate;
- }
-
- /**
- * @return the deleted
- */
- public boolean isDeleted() {
- return deleted;
- }
-
- /**
- * @param deleted the deleted to set
- */
- public void setDeleted(boolean deleted) {
- this.deleted = deleted;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConstraintType.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConstraintType.java
deleted file mode 100644
index 60923d5a8..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConstraintType.java
+++ /dev/null
@@ -1,121 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="ConstraintType")
-@NamedQuery(name="ConstraintType.findAll", query="SELECT a FROM ConstraintType a")
-public class ConstraintType implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public static final String ENUMERATION_TYPE = "Enumeration";
- public static final String RANGE_TYPE = "Range";
- public static final String REGEXP_TYPE = "Regular Expression";
-
- protected static final Map<String, String> defaults = new HashMap<>();
- static {
- defaults.put(ENUMERATION_TYPE, "Enumerate a set of values that the attribute may be set to during policy creation.");
- defaults.put(RANGE_TYPE, "Set a range of min and/or max integer/double values the attribute can be set to during policy creation.");
- defaults.put(REGEXP_TYPE, "Define a regular expression the attribute must match against during policy creation.");
- }
- private static final String[] RANGE_TYPES = {"minExclusive", "minInclusive", "maxExclusive", "maxInclusive"};
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="constraint_type", nullable=false, length=64)
- private String constraintType;
-
- @Column(name="description", nullable=false, length=255)
- private String description;
-
- //bi-directional many-to-one association to Attribute
- @OneToMany(mappedBy="constraintType")
- private Set<Attribute> attributes = new HashSet<>();
-
- public ConstraintType() {
-
- }
-
- public ConstraintType(String constraintType) {
- this();
- this.constraintType = constraintType;
- }
-
- public ConstraintType(String constraintType, String description) {
- this(constraintType);
- this.description = description;
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getConstraintType() {
- return constraintType;
- }
-
- public void setConstraintType(String constraintType) {
- this.constraintType = constraintType;
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Set<Attribute> getAttributes() {
- return attributes;
- }
-
- public void setAttributes(Set<Attribute> attributes) {
- this.attributes = attributes;
- }
-
- public static String[] getRangeTypes() {
- return RANGE_TYPES;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConstraintValue.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConstraintValue.java
deleted file mode 100644
index 65eb6586a..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ConstraintValue.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
-
-
-/**
- * The persistent class for the ConstraintValues database table.
- *
- */
-@Entity
-@Table(name="ConstraintValues")
-@NamedQuery(name="ConstraintValue.findAll", query="SELECT c FROM ConstraintValue c")
-public class ConstraintValue implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="property")
- private String property;
-
- @Column(name="value")
- private String value;
-
- //bi-directional many-to-one association to Attribute
- @ManyToOne
- @JoinColumn(name="attribute_id")
- private Attribute attribute;
-
- public ConstraintValue() {
- }
-
- public ConstraintValue(String property, String value) {
- this.property = property;
- this.value = value;
- }
-
- public ConstraintValue(ConstraintValue value) {
- this.property = value.getProperty();
- this.value = value.getValue();
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getProperty() {
- return this.property;
- }
-
- public void setProperty(String property) {
- this.property = property;
- }
-
- public String getValue() {
- return this.value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- public Attribute getAttribute() {
- return this.attribute;
- }
-
- public void setAttribute(Attribute attribute) {
- this.attribute = attribute;
- }
-
- public ConstraintValue clone() {
- ConstraintValue constraint = new ConstraintValue();
-
- constraint.property = this.property;
- constraint.value = this.value;
- constraint.attribute = this.attribute;
-
- return constraint;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DCAEUsers.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DCAEUsers.java
deleted file mode 100644
index fdad24419..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DCAEUsers.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="DCAEUsers")
-@NamedQuery(name="DCAEUsers.findAll", query="SELECT e FROM DCAEUsers e ")
-public class DCAEUsers implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="description ")
- private String description ;
-
-
- public DCAEUsers() {
-
- }
- public DCAEUsers(String string, String userid) {
- this(domain);
-
- }
- public DCAEUsers(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
-
- }
- public String getDescriptionValue() {
- return this.description ;
- }
-
- public void setDescriptionValue(String description ) {
- this.description = description ;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DCAEuuid.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DCAEuuid.java
deleted file mode 100644
index 9e7225fc7..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DCAEuuid.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="DCAEuuid")
-@NamedQuery(name="DCAEuuid.findAll", query="SELECT e FROM DCAEuuid e ")
-public class DCAEuuid implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="description")
- private String description;
-
-
- public DCAEuuid() {
-
- }
- public DCAEuuid(String string, String userid) {
- this(domain);
-
- }
- public DCAEuuid(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
-
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DatabaseLockEntity.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DatabaseLockEntity.java
deleted file mode 100644
index c24b13a0e..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DatabaseLockEntity.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="DatabaseLockEntity")
-public class DatabaseLockEntity implements Serializable {
- private static final long serialVersionUID = 1L;
- @Id
- @Column(name="lock_key")
- private int lock_key = 1;
- public DatabaseLockEntity(){
-
- }
- public int getKey(){
- return lock_key;
- }
- public void setKey(int key){
- this.lock_key = key;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Datatype.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Datatype.java
deleted file mode 100644
index 05e4fbc0c..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Datatype.java
+++ /dev/null
@@ -1,244 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-import com.att.research.xacml.api.Identifier;
-import com.att.research.xacml.api.XACML3;
-import com.att.research.xacml.std.IdentifierImpl;
-import com.fasterxml.jackson.annotation.JsonBackReference;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-
-
-/**
- * The persistent class for the Datatype database table.
- *
- */
-@Entity
-@Table(name="Datatype")
-@NamedQuery(name="Datatype.findAll", query="SELECT d FROM Datatype d")
-public class Datatype implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public static final char STANDARD = 'S';
- public static final char CUSTOM = 'C';
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="is_standard", nullable=false)
- private char isStandard;
-
- @Column(name="xacml_id", nullable=false, unique=true, length=255)
- private String xacmlId;
-
- @Column(name="short_name", nullable=false, length=64)
- private String shortName;
-
- //bi-directional many-to-one association to Attribute
- @OneToMany(mappedBy="datatypeBean")
- @JsonBackReference
- private Set<Attribute> attributes = new HashSet<>();
-
- //bi-directional many-to-one association to Attribute
- @OneToMany(mappedBy="datatypeBean")
- @JsonIgnore
- private Set<FunctionDefinition> functions = new HashSet<>();
-
- //bi-directional many-to-one association to Attribute
- @OneToMany(mappedBy="datatypeBean")
- @JsonIgnore
- private Set<FunctionArgument> arguments = new HashSet<>();
-
- public Datatype() {
- this.xacmlId = XACML3.ID_DATATYPE_STRING.stringValue();
- this.isStandard = Datatype.STANDARD;
- }
-
-
- public Datatype(int id, Datatype dt) {
- this.id = id;
- this.isStandard = dt.isStandard;
- this.xacmlId = dt.xacmlId;
- this.shortName = dt.shortName;
- //
- // Make a copy?
- //
- this.attributes = new HashSet<>();
- }
-
- public Datatype(Identifier identifier, char standard) {
- if (identifier != null) {
- this.xacmlId = identifier.stringValue();
-
- }
- this.isStandard = standard;
- }
-
- public Datatype(Identifier identifier) {
- this(identifier, Datatype.STANDARD);
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public char getIsStandard() {
- return this.isStandard;
- }
-
- public void setIsStandard(char isStandard) {
- this.isStandard = isStandard;
- }
-
- public String getXacmlId() {
- return this.xacmlId;
- }
-
- public void setXacmlId(String xacmlId) {
- this.xacmlId = xacmlId;
- }
-
- public String getShortName() {
- return shortName;
- }
-
- public void setShortName(String shortName) {
- this.shortName = shortName;
- }
-
- public Set<Attribute> getAttributes() {
- return this.attributes;
- }
-
- public void setAttributes(Set<Attribute> attributes) {
- this.attributes = attributes;
- }
-
- public Attribute addAttribute(Attribute attribute) {
- getAttributes().add(attribute);
- attribute.setDatatypeBean(this);
-
- return attribute;
- }
-
- public Attribute removeAttribute(Attribute attribute) {
- getAttributes().remove(attribute);
- attribute.setDatatypeBean(null);
-
- return attribute;
- }
-
- public Set<FunctionDefinition> getFunctions() {
- return this.functions;
- }
-
- public void setFunctions(Set<FunctionDefinition> functions) {
- this.functions = functions;
- }
-
- public FunctionDefinition addFunction(FunctionDefinition function) {
- getFunctions().add(function);
- function.setDatatypeBean(this);
-
- return function;
- }
-
- public FunctionDefinition removeAttribute(FunctionDefinition function) {
- getFunctions().remove(function);
- function.setDatatypeBean(null);
-
- return function;
- }
-
- public Set<FunctionArgument> getArguments() {
- return this.arguments;
- }
-
- public void setArguments(Set<FunctionArgument> argument) {
- this.arguments = argument;
- }
-
- public FunctionArgument addArgument(FunctionArgument argument) {
- getArguments().add(argument);
- argument.setDatatypeBean(this);
-
- return argument;
- }
-
- public FunctionArgument removeArgument(FunctionArgument argument) {
- getArguments().remove(argument);
- argument.setDatatypeBean(null);
-
- return argument;
- }
-
- @Transient
- public Identifier getIdentifer() {
- return new IdentifierImpl(this.xacmlId);
- }
-
- @Transient
- public Identifier getIdentiferByShortName() {
- return new IdentifierImpl(this.shortName);
- }
-
- @Transient
- public boolean isStandard() {
- return (this.isStandard == Datatype.STANDARD);
- }
-
- @Transient
- public boolean isCustom() {
- return (this.isStandard == Datatype.CUSTOM);
- }
-
- @Transient
- @Override
- public String toString() {
- return "Datatype [id=" + id + ", isStandard=" + isStandard
- + ", xacmlId=" + xacmlId + ", shortName=" + shortName
- + ", attributes=" + attributes + ", functions=" + functions
- + ", arguments=" + arguments + "]";
-
- //return "Datatype [shortName=" + shortName + "]";
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DecisionSettings.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DecisionSettings.java
deleted file mode 100644
index 2d3e5b58a..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DecisionSettings.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Transient;
-
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-
-@Entity
-@Table(name="DecisionSettings")
-@NamedQuery(name="DecisionSettings.findAll", query="SELECT a FROM DecisionSettings a order by a.priority asc, a.xacmlId asc")
-public class DecisionSettings implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @Column(name="PRIORITY", nullable=true)
- @OrderBy("asc")
- private String priority;
-
- @Column(name="xacml_id", unique = true, nullable=false)
- @OrderBy("asc")
- private String xacmlId = "urn";
-
- //bi-directional many-to-one association to Datatype
- @ManyToOne
- @JoinColumn(name="datatype")
- private Datatype datatypeBean;
-
- @Transient
- private String issuer = null;
-
- @Transient
- private boolean mustBePresent = false;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- public DecisionSettings() {
- }
-
- public DecisionSettings(String domain) {
- this.xacmlId = domain;
- }
-
- public DecisionSettings(String domain, String user) {
- this(domain);
- }
- public DecisionSettings(DecisionSettings copy, String user) {
- this(copy.getXacmlId() + ":(0)", user);
- this.datatypeBean = copy.getDatatypeBean();
- this.description = copy.getDescription();
-
- }
-
- public String getDecisionSettings(){
- return this.xacmlId;
- }
-
- public String setDecisionSettings(){
- return this.xacmlId;
- }
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy = XacmlAdminAuthorization.getUserId();;
- } catch (Exception e) {
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "DecisionSettings", "Exception caused While adding Modified by Role");
- }
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
- public String getXacmlId() {
- return this.xacmlId;
- }
-
-/* @Transient
- public Identifier getXacmlIdentifier() {
- return new IdentifierImpl(this.xacmlId);
- }*/
-
- public void setXacmlId(String xacmlId) {
- this.xacmlId = xacmlId;
- }
-
- public Datatype getDatatypeBean() {
- return this.datatypeBean;
- }
-
- public void setDatatypeBean(Datatype datatypeBean) {
- this.datatypeBean = datatypeBean;
- }
-
- @Transient
- public String getIssuer() {
- return issuer;
- }
-
- @Transient
- public void setIssuer(String issuer) {
- this.issuer = issuer;
- }
-
- @Transient
- public boolean isMustBePresent() {
- return mustBePresent;
- }
-
- @Transient
- public void setMustBePresent(boolean mustBePresent) {
- this.mustBePresent = mustBePresent;
- }
-
- public String getPriority() {
- return priority;
- }
-
- public void setPriority(String priority) {
- this.priority = priority;
- }
-}
-
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DescriptiveScope.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DescriptiveScope.java
deleted file mode 100644
index d4719cf41..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/DescriptiveScope.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-
-
-@Entity
-@Table(name = "DescriptiveScope")
-@NamedQuery(name = "DescriptiveScope.findAll", query= "Select p from DescriptiveScope p")
-public class DescriptiveScope implements Serializable {
- private static final long serialVersionUID = 1L;
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name = "Id")
- private int id;
-
- @Column(name="scopename", nullable=false)
- @OrderBy("asc")
- private String descriptiveScopeName;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Column(name="search", nullable=true)
- @OrderBy("asc")
- private String search;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- private static Log LOGGER = LogFactory.getLog(DescriptiveScope.class);
-
- public DescriptiveScope(){
-
- }
-
- public DescriptiveScope(String string, String userid) {
- this(string);
- }
-
- public DescriptiveScope(String domain) {
- this.descriptiveScopeName = domain;
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy =XacmlAdminAuthorization.getUserId();;
- } catch (Exception e) {
- LOGGER.error("Exception caused While adding Modified by Role"+e);
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "DescriptiveScope", "Exception caused While adding Modified by Role");
- }
- }
-
- public int getId() {
- return this.id;
- }
- public void setId(int id) {
- this.id = id;
- }
-
- public String getScopeName() {
- return descriptiveScopeName;
- }
-
- public void setScopeName(String descriptiveScopeName) {
- this.descriptiveScopeName = descriptiveScopeName;
- }
-
- public String getSearch() {
- return search;
- }
-
- public void setSearch(String search) {
- this.search = search;
- }
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/EcompName.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/EcompName.java
deleted file mode 100644
index 09dcd4738..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/EcompName.java
+++ /dev/null
@@ -1,167 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-
-@Entity
-@Table(name="EcompName")
-@NamedQuery(name="EcompName.findAll", query="SELECT e FROM EcompName e ")
-public class EcompName implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="ecomp_Name", nullable=false, unique=true)
- @OrderBy("asc")
- private String ecompName;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- public EcompName() {
-
- }
-
- public EcompName(String string, String userid) {
- this(domain);
- }
-
- public EcompName(String domain) {
- this.ecompName = domain;
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy =XacmlAdminAuthorization.getUserId();
- } catch (Exception e) {
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "EcompName", "Exception caused While adding Modified by Role");
- }
- }
- public String getEcompName() {
- return this.ecompName;
- }
-
- public void setEcompName(String ecompName) {
- this.ecompName = ecompName;
-
- }
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/EnforcingType.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/EnforcingType.java
deleted file mode 100644
index f293bc0cb..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/EnforcingType.java
+++ /dev/null
@@ -1,96 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.*;
-
-/**
- * Entity implementation class for Entity: EnforcingType
- *
- */
-@Entity
-@Table(name="EnforcingType")
-@NamedQuery(name="EnforcingType.findAll", query="SELECT e FROM EnforcingType e ")
-public class EnforcingType implements Serializable {
-
-
- private static final long serialVersionUID = 1L;
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
- @Column(name="enforcingType", nullable=false, unique=true)
- @OrderBy("asc")
- private String enforcingType;
- @Column(name="script", nullable=false, length=255)
- private String script;
- @Column(name="connectionQuery", nullable=false, length=255)
- private String connectionQuery;
- @Column(name="valueQuery", nullable=false, length=255)
- private String valueQuery;
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getEnforcingType() {
- return enforcingType;
- }
-
- public void setEnforcingType(String enforcingType) {
- this.enforcingType = enforcingType;
- }
-
- public String getScript() {
- return script;
- }
-
- public void setScript(String script) {
- this.script = script;
- }
-
- public String getConnectionQuery() {
- return connectionQuery;
- }
-
- public void setConnectionQuery(String connectionQuery) {
- this.connectionQuery = connectionQuery;
- }
-
- public String getValueQuery() {
- return valueQuery;
- }
-
- public void setValueQuery(String valueQuery) {
- this.valueQuery = valueQuery;
- }
-
- public EnforcingType() {
- super();
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FWTag.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FWTag.java
deleted file mode 100644
index f10f6662c..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FWTag.java
+++ /dev/null
@@ -1,180 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-@Entity
-@Table(name = "FWTag")
-@NamedQuery(name = "FWTag.findAll", query= "Select p from FWTag p")
-public class FWTag implements Serializable {
- private static final long serialVersionUID = 1L;
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name = "Id")
- private int id;
-
- @Column(name="tagName", nullable=false)
- @OrderBy("asc")
- private String fwTagName;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Column(name="tagValues", nullable=true)
- @OrderBy("asc")
- private String tagValues;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- private static Log LOGGER = LogFactory.getLog(FWTag.class);
-
- public FWTag(){
-
- }
-
- public FWTag(String string, String userid) {
- this(string);
- }
-
- public FWTag(String domain) {
- this.fwTagName = domain;
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy =XacmlAdminAuthorization.getUserId();;
- } catch (Exception e) {
- LOGGER.error("Exception caused While adding Modified by Role"+e);
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "FWTag", "Exception caused While adding Modified by Role");
- }
- }
-
- public int getId() {
- return this.id;
- }
- public void setId(int id) {
- this.id = id;
- }
-
- public String getFwTagName() {
- return fwTagName;
- }
-
- public void setFwTagName(String fwTagName) {
- this.fwTagName = fwTagName;
- }
-
- public String getTagValues() {
- return tagValues;
- }
-
- public void setTagValues(String tagValues) {
- this.tagValues = tagValues;
- }
-
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FWTagPicker.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FWTagPicker.java
deleted file mode 100644
index 032f77f3c..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FWTagPicker.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-@Entity
-@Table(name = "FWTagPicker")
-@NamedQuery(name = "FWTagPicker.findAll", query= "Select p from FWTagPicker p")
-public class FWTagPicker implements Serializable {
- private static final long serialVersionUID = 1L;
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name = "Id")
- private int id;
-
- @Column(name="tagPickerName", nullable=false)
- @OrderBy("asc")
- private String tagPickerName;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Column(name="networkRole", nullable=true)
- private String networkRole;
-
- @Column(name="tags", nullable=true)
- @OrderBy("asc")
- private String tagValues;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- private static Log logger = LogFactory.getLog(FWTagPicker.class);
-
- public FWTagPicker(){
-
- }
-
- public FWTagPicker(String string, String userid) {
- this(string);
- }
-
- public FWTagPicker(String domain) {
- this.tagPickerName = domain;
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy =XacmlAdminAuthorization.getUserId();
- } catch (Exception e) {
- logger.error("Exception caused While adding Modified by Role"+e);
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "DescriptiveScope", "Exception caused While adding Modified by Role");
- }
- }
-
- public int getId() {
- return this.id;
- }
- public void setId(int id) {
- this.id = id;
- }
-
- public String getTagPickerName() {
- return tagPickerName;
- }
-
- public void setTagPickerName(String tagPickerName) {
- this.tagPickerName = tagPickerName;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getNetworkRole() {
- return networkRole;
- }
-
- public void setNetworkRole(String networkRole) {
- this.networkRole = networkRole;
- }
-
- public String getTagValues() {
- return tagValues;
- }
-
- public void setTagValues(String tagValues) {
- this.tagValues = tagValues;
- }
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FirewallDictionaryList.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FirewallDictionaryList.java
deleted file mode 100644
index 712172acb..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FirewallDictionaryList.java
+++ /dev/null
@@ -1,164 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="parentdictionaryitems")
-@NamedQuery(name="FirewallDictionaryList.findAll", query="SELECT e FROM FirewallDictionaryList e")
-public class FirewallDictionaryList implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="parentItemName", nullable=false)
- @OrderBy("asc")
- private String parentItemName;
-
- @Column(name="description")
- private String description;
-
- @Column(name="addressList")
- private String addressList;
-
- @Column(name="serviceList")
- private String serviceList;
-
-/* @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;*/
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getParentItemName() {
- return parentItemName;
- }
-
- public String getDescription() {
- return description;
- }
-
- public String getAddressList() {
- return addressList;
- }
-
- public String getServiceList() {
- return serviceList;
- }
-
- public void setParentItemName(String parentItemName) {
- this.parentItemName = parentItemName;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public void setAddressList(String addressList) {
- this.addressList = addressList;
- }
-
- public void setServiceList(String serviceList) {
- this.serviceList = serviceList;
- }
-
-
- /*public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }*/
-
- public FirewallDictionaryList() {
-
- }
-
- public FirewallDictionaryList(String string, String userid) {
- this(domain);
- }
- public FirewallDictionaryList(String domain) {
- this.parentItemName = domain;
- }
-
- /*@PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- auditLogger.debug("Added New Term Name: "+this.parentItemName+" by "+this.userCreatedBy);
-
- }
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy =XacmlAdminAuthorization.getUserId();;
- } catch (Exception e) {
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "TermList", "Exception caused While adding Modified by Role");
- }
- auditLogger.debug("Updated Term Name: "+this.parentItemName+" by "+this.userModifiedBy);
- }
-*/
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FunctionArgument.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FunctionArgument.java
deleted file mode 100644
index c660fde06..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FunctionArgument.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.*;
-
-
-/**
- * The persistent class for the FunctionArguments database table.
- *
- */
-@Entity
-@Table(name="FunctionArguments")
-@NamedQuery(name="FunctionArgument.findAll", query="SELECT f FROM FunctionArgument f")
-public class FunctionArgument implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy=GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="is_bag", nullable=false)
- private int isBag;
-
- //bi-directional many-to-one association to FunctionDefinition
- @ManyToOne
- @JoinColumn(name="function_id")
- private FunctionDefinition functionDefinition;
-
- @Column(name="arg_index", nullable=false)
- private int argIndex;
-
- //bi-directional many-to-one association to Datatype
- @ManyToOne
- @JoinColumn(name="datatype_id")
- private Datatype datatypeBean;
-
- public FunctionArgument() {
- }
-
- public FunctionArgument(final FunctionArgument argument) {
- this.argIndex = argument.argIndex;
- this.datatypeBean = argument.datatypeBean;
- this.isBag = argument.isBag;
- this.functionDefinition = argument.functionDefinition;
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public int getArgIndex() {
- return this.argIndex;
- }
-
- public void setArgIndex(int argIndex) {
- this.argIndex = argIndex;
- }
-
- public Datatype getDatatypeBean() {
- return this.datatypeBean;
- }
-
- public void setDatatypeBean(Datatype datatypeBean) {
- this.datatypeBean = datatypeBean;
- }
-
- public FunctionDefinition getFunctionDefinition() {
- return this.functionDefinition;
- }
-
- public int getIsBag() {
- return isBag;
- }
-
- public void setIsBag(int isBag) {
- this.isBag = isBag;
- }
-
- public void setFunctionDefinition(FunctionDefinition functionDefinition) {
- this.functionDefinition = functionDefinition;
- }
-
- @Transient
- @Override
- public String toString() {
- return "FunctionArgument [id=" + id + ", argIndex=" + argIndex
- + ", datatypeBean=" + datatypeBean + ", isBag=" + isBag
- + ", functionDefinition=" + functionDefinition + "]";
- }
-
- @Transient
- public boolean isBag() {
- return this.isBag == 1;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FunctionDefinition.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FunctionDefinition.java
deleted file mode 100644
index c0ccef99a..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/FunctionDefinition.java
+++ /dev/null
@@ -1,219 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.*;
-
-import java.util.List;
-
-
-/**
- * The persistent class for the FunctionDefinition database table.
- *
- */
-@Entity
-@Table(name="FunctionDefinition")
-@NamedQueries({
- @NamedQuery(name="FunctionDefinition.findAll", query="SELECT f FROM FunctionDefinition f")
-})
-public class FunctionDefinition implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy=GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="short_name", nullable=false, length=64)
- private String shortname;
-
- @Column(name="xacml_id", nullable=false, length=255)
- private String xacmlid;
-
- //bi-directional many-to-one association to Datatype
- @ManyToOne
- @JoinColumn(name="return_datatype", nullable=true)
- private Datatype datatypeBean;
-
- @Column(name="is_bag_return", nullable=false)
- private Integer isBagReturn;
-
- @Column(name="is_higher_order", nullable=false)
- private Integer isHigherOrder;
-
- @Column(name="arg_lb", nullable=false)
- private Integer argLb;
-
- @Column(name="arg_ub", nullable=false)
- private Integer argUb;
-
- @Column(name="ho_arg_lb", nullable=true)
- private Integer higherOrderArg_LB;
-
- @Column(name="ho_arg_ub", nullable=true)
- private Integer higherOrderArg_UB;
-
- @Column(name="ho_primitive", nullable=true)
- private Character higherOrderIsPrimitive;
-
- //bi-directional many-to-one association to FunctionArgument
- @OneToMany(mappedBy="functionDefinition")
- private List<FunctionArgument> functionArguments;
-
- public FunctionDefinition() {
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(Integer id) {
- this.id = id;
- }
-
- public int getArgLb() {
- return this.argLb;
- }
-
- public void setArgLb(Integer argLb) {
- this.argLb = argLb;
- }
-
- public int getArgUb() {
- return this.argUb;
- }
-
- public void setArgUb(Integer argUb) {
- this.argUb = argUb;
- }
-
- public int getIsBagReturn() {
- return isBagReturn;
- }
-
- public void setIsBagReturn(Integer isBagReturn) {
- this.isBagReturn = isBagReturn;
- }
-
- public int getIsHigherOrder() {
- return isHigherOrder;
- }
-
- public void setIsHigherOrder(Integer isHigherOrder) {
- this.isHigherOrder = isHigherOrder;
- }
-
- public Datatype getDatatypeBean() {
- return this.datatypeBean;
- }
-
- public void setDatatypeBean(Datatype datatypeBean) {
- this.datatypeBean = datatypeBean;
- }
-
- public String getShortname() {
- return this.shortname;
- }
-
- public void setShortname(String shortname) {
- this.shortname = shortname;
- }
-
- public String getXacmlid() {
- return this.xacmlid;
- }
-
- public void setXacmlid(String xacmlid) {
- this.xacmlid = xacmlid;
- }
-
- public int getHigherOrderArg_LB() {
- return higherOrderArg_LB;
- }
-
- public void setHigherOrderArg_LB(Integer higherOrderArg_LB) {
- this.higherOrderArg_LB = higherOrderArg_LB;
- }
-
- public int getHigherOrderArg_UB() {
- return higherOrderArg_UB;
- }
-
- public void setHigherOrderArg_UB(Integer higherOrderArg_UB) {
- this.higherOrderArg_UB = higherOrderArg_UB;
- }
-
- public Character getHigherOrderIsPrimitive() {
- return higherOrderIsPrimitive;
- }
-
- public void setHigherOrderIsPrimitive(Character higherOrderIsPrimitive) {
- this.higherOrderIsPrimitive = higherOrderIsPrimitive;
- }
-
- public List<FunctionArgument> getFunctionArguments() {
- return this.functionArguments;
- }
-
- public void setFunctionArguments(List<FunctionArgument> functionArguments) {
- this.functionArguments = functionArguments;
- }
-
- public FunctionArgument addFunctionArgument(FunctionArgument functionArgument) {
- getFunctionArguments().add(functionArgument);
- functionArgument.setFunctionDefinition(this);
-
- return functionArgument;
- }
-
- public FunctionArgument removeFunctionArgument(FunctionArgument functionArgument) {
- getFunctionArguments().remove(functionArgument);
- functionArgument.setFunctionDefinition(null);
-
- return functionArgument;
- }
-
- @Transient
- @Override
- public String toString() {
- return "FunctionDefinition [id=" + id + ", argLb=" + argLb + ", argUb="
- + argUb + ", isBagReturn=" + isBagReturn + ", isHigherOrder="
- + isHigherOrder + ", datatypeBean=" + datatypeBean
- + ", shortname=" + shortname + ", xacmlid=" + xacmlid
- + ", higherOrderArg_LB=" + higherOrderArg_LB
- + ", higherOrderArg_UB=" + higherOrderArg_UB
- + ", higherOrderIsPrimitive=" + higherOrderIsPrimitive
- + ", functionArguments=" + functionArguments + "]";
- }
-
- @Transient
- public boolean isBagReturn() {
- return this.isBagReturn == 1;
- }
-
- @Transient
- public boolean isHigherOrder() {
- return this.isHigherOrder == 1;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GlobalRoleSettings.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GlobalRoleSettings.java
deleted file mode 100644
index 5b69cab32..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GlobalRoleSettings.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
-
-
-/**
- * Entity implementation class for Entity: Administration
- *
- */
-@Entity
-@Table(name="GlobalRoleSettings")
-@NamedQuery(name="GlobalRoleSettings.findAll", query="SELECT g FROM GlobalRoleSettings g")
-public class GlobalRoleSettings implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @Column(name="role", length=45)
- private String role;
-
- @Column(name="lockdown")
- private boolean lockdown;
-
- public GlobalRoleSettings() {
- super();
- }
-
- public GlobalRoleSettings(boolean lockdown) {
- this.role = org.openecomp.policy.rest.XacmlAdminAuthorization.Role.ROLE_SUPERADMIN.toString();
- this.lockdown = lockdown;
- }
-
- /**
- * return the role
- *
- * @return the role
- */
- public String getRole() {
- return role;
- }
-
- /**
- * set role
- *
- * @param role the role to set
- */
- public void setRole(String role) {
- this.role = role;
- }
-
- /**
- * is the system locked down
- *
- * @return
- */
- public boolean isLockdown() {
- return lockdown;
- }
-
- /**
- * sets lockdown configuration
- *
- * @param lockdown
- */
- public void setLockdown(boolean lockdown) {
- this.lockdown = lockdown;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GroupEntity.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GroupEntity.java
deleted file mode 100644
index 405a5d458..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GroupEntity.java
+++ /dev/null
@@ -1,270 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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=========================================================
- */
-
-/*
- * AT&T - PROPRIETARY
- * THIS FILE CONTAINS PROPRIETARY INFORMATION OF
- * AT&T AND IS NOT TO BE DISCLOSED OR USED EXCEPT IN
- * ACCORDANCE WITH APPLICABLE AGREEMENTS.
- *
- * Copyright (c) 2013 AT&T Knowledge Ventures
- * Unpublished and Not for Publication
- * All Rights Reserved
- */
-package org.openecomp.policy.rest.jpa;
-/*
- */
-import java.io.Serializable;
-import java.util.Date;
-import java.util.List;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.JoinTable;
-import javax.persistence.ManyToMany;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Version;
-
-import com.fasterxml.jackson.annotation.JsonManagedReference;
-
-/*
- * The Entity class to persist a policy object and its configuration data
- */
-
-/**
- *
- */
-@Entity
-//Add a non-unique index and a constraint that says the combo of policyName and scopeId must be unique
-@Table(name="GroupEntity")
-
-@NamedQueries({
- @NamedQuery(name="GroupEntity.findAll", query="SELECT e FROM GroupEntity e "),
- @NamedQuery(name="GroupEntity.deleteAll", query="DELETE FROM GroupEntity WHERE 1=1")
-})
-
-public class GroupEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @Column (name="groupKey", nullable=false)
- @GeneratedValue(strategy = GenerationType.AUTO)
- private long groupKey;
-
- @Column (name="groupId", nullable=false)
- private String groupId;
-
- @Column(name="groupName", nullable=false, unique=false, length=255)
- private String groupName;
-
- @Version
- @Column(name="version")
- private int version;
-
- @ManyToMany(cascade = CascadeType.ALL)
- @JoinTable(name="PolicyGroupEntity",joinColumns={@JoinColumn(name="groupKey")}, inverseJoinColumns={@JoinColumn(name="policyId")})
- @JsonManagedReference
- private List<PolicyEntity> policies;
-
- @Column(name="created_by", nullable=false, length=255)
- private String createdBy = "guest";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Column(name="description", nullable=false, length=2048)
- private String description = "NoDescription";
-
- @Column(name="modified_by", nullable=false, length=255)
- private String modifiedBy = "guest";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @Column(name="defaultGroup", nullable=false)
- private boolean defaultGroup = false;
- @Column(name="deleted", nullable=false)
- private boolean deleted = false;
-
- public GroupEntity() {
- super();
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- }
-
- /**
- * @return the policyId
- */
- public String getGroupId() {
- return groupId;
- }
- public long getGroupKey(){
- return groupKey;
- }
-
- public void setGroupId(String groupId){
- this.groupId = groupId;
- }
-
- /**
- * @param policyId cannot be set
- */
-
- public String getgroupName() {
- return groupName;
- }
-
- public void setGroupName(String groupName) {
- this.groupName = groupName;
- }
-
- public boolean isDefaultGroup(){
- return defaultGroup;
- }
-
- public void setDefaultGroup(boolean isDefaultGroup){
- this.defaultGroup = isDefaultGroup;
- }
-
-
-
- /**
- * @return the configurationDataEntity
- */
- public List<PolicyEntity> getPolicies() {
- return policies;
- }
-
- /**
- * @param configurationDataEntity the configurationDataEntity to set
- */
- public void addPolicyToGroup(PolicyEntity policy) {
- if(!this.policies.contains(policy)){
- this.policies.add(policy);
- }
- }
- public void removePolicyFromGroup(PolicyEntity policy){
- this.policies.remove(policy);
- }
-
-
-
- /**
- * @return the createdBy
- */
- public String getCreatedBy() {
- return createdBy;
- }
-
- /**
- * @param createdBy the createdBy to set
- */
- public void setCreatedBy(String createdBy) {
- this.createdBy = createdBy;
- }
-
- /**
- * @return the description
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @param description the description to set
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
- /**
- * @return the modifiedBy
- */
- public String getModifiedBy() {
- return modifiedBy;
- }
-
- /**
- * @param modifiedBy the modifiedBy to set
- */
- public void setModifiedBy(String modifiedBy) {
- this.modifiedBy = modifiedBy;
- }
-
- /**
- * @return the version
- */
- public int getVersion() {
- return version;
- }
-
- /**
- * @return the createdDate
- */
- public Date getCreatedDate() {
- return createdDate;
- }
-
- /**
- * @return the modifiedDate
- */
- public Date getModifiedDate() {
- return modifiedDate;
- }
-
- /**
- * @return the deleted
- */
- public boolean isDeleted() {
- return deleted;
- }
-
- /**
- * @param deleted the deleted to set
- */
- public void setDeleted(boolean deleted) {
- this.deleted = deleted;
- }
-
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GroupPolicyScopeList.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GroupPolicyScopeList.java
deleted file mode 100644
index a8e052282..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GroupPolicyScopeList.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="GroupPolicyScopeList")
-@NamedQuery(name="GroupPolicyScopeList.findAll", query="SELECT e FROM GroupPolicyScopeList e ")
-public class GroupPolicyScopeList implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="groupList")
- private String groupList;
-
- @Column(name="description")
- private String description;
-
- public GroupPolicyScopeList() {
-
- }
- public GroupPolicyScopeList(String string, String userid) {
- this(domain);
-
- }
- public GroupPolicyScopeList(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getGroupName() {
- return this.name;
- }
-
- public void setGroupName(String serviceName) {
- this.name = serviceName;
-
- }
-
- public String getGroupList() {
- return this.groupList;
- }
-
- public void setGroupList(String groupList) {
- this.groupList = groupList;
-
- }
- public String getDescription() {
- return description;
- }
- public void setDescription(String description) {
- this.description = description;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GroupServiceList.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GroupServiceList.java
deleted file mode 100644
index d214e4694..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/GroupServiceList.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="GroupServiceList")
-@NamedQuery(name="GroupServiceList.findAll", query="SELECT e FROM GroupServiceList e ")
-public class GroupServiceList implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="serviceList ")
- private String serviceList;
-
-
- public GroupServiceList() {
-
- }
- public GroupServiceList(String string, String userid) {
- this(domain);
-
- }
- public GroupServiceList(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getGroupName() {
- return this.name;
- }
-
- public void setGroupName(String serviceName) {
- this.name = serviceName;
-
- }
-
- public String getServiceList() {
- return this.serviceList;
- }
-
- public void setServiceList(String serviceList) {
- this.serviceList = serviceList;
-
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceAttribute.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceAttribute.java
deleted file mode 100644
index e30379e1d..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceAttribute.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="MicroServiceAttribute")
-@NamedQuery(name="MicroServiceAttribute.findAll", query="SELECT e FROM MicroServiceAttribute e ")
-public class MicroServiceAttribute implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="value")
- private String value ;
-
- @Column(name="modelName")
- private String modelName;
-
-
- public MicroServiceAttribute() {
-
- }
- public MicroServiceAttribute(String string, String userid) {
- this(domain);
-
- }
- public MicroServiceAttribute(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
-
- }
- public String getValue() {
- return this.value ;
- }
-
- public void setValue(String value ) {
- this.value = value ;
- }
- public String getModelName() {
- return modelName;
- }
- public void setModelName(String modelName) {
- this.modelName = modelName;
- }
-
-} \ No newline at end of file
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceConfigName.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceConfigName.java
deleted file mode 100644
index 0a1034c77..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceConfigName.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="MicroServiceConfigName")
-@NamedQuery(name="MicroServiceConfigName.findAll", query="SELECT e FROM MicroServiceConfigName e ")
-public class MicroServiceConfigName implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="description ")
- private String description ;
-
-
- public MicroServiceConfigName() {
-
- }
- public MicroServiceConfigName(String string, String userid) {
- this(domain);
-
- }
- public MicroServiceConfigName(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
-
- }
- public String getDescriptionValue() {
- return this.description ;
- }
-
- public void setDescriptionValue(String description ) {
- this.description = description ;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceLocation.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceLocation.java
deleted file mode 100644
index a72f690ac..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceLocation.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="MicroServiceLocation")
-@NamedQuery(name="MicroServiceLocation.findAll", query="SELECT e FROM MicroServiceLocation e ")
-public class MicroServiceLocation implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="description ")
- private String description ;
-
-
- public MicroServiceLocation() {
-
- }
- public MicroServiceLocation(String string, String userid) {
- this(domain);
-
- }
- public MicroServiceLocation(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
-
- }
- public String getDescriptionValue() {
- return this.description ;
- }
-
- public void setDescriptionValue(String description ) {
- this.description = description ;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceModels.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceModels.java
deleted file mode 100644
index c1eb24058..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/MicroServiceModels.java
+++ /dev/null
@@ -1,189 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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=========================================================
- */
-
-/*
- * AT&T - PROPRIETARY
- * THIS FILE CONTAINS PROPRIETARY INFORMATION OF
- * AT&T AND IS NOT TO BE DISCLOSED OR USED EXCEPT IN
- * ACCORDANCE WITH APPLICABLE AGREEMENTS.
- *
- * Copyright (c) 2015 AT&T Knowledge Ventures
- * Unpublished and Not for Publication
- * All Rights Reserved
- */
-package org.openecomp.policy.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.Table;
-/*
- * JPA for the Micro Service Models.
- *
- * @version: 0.1
- */
-
-
-@Entity
-@Table(name="MicroServiceModels")
-@NamedQuery(name="MicroServiceModels.findAll", query="SELECT b FROM MicroServiceModels b ")
-public class MicroServiceModels implements Serializable{
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="modelName", nullable=false, unique=true)
- @OrderBy("asc")
- private String modelName;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Column(name="dependency", nullable=true, length=2048)
- private String dependency;
-
- @Column(name="attributes", nullable=false, length=255)
- private String attributes;
-
- @Column(name="ref_attributes", nullable=false, length=255)
- private String ref_attributes;
-
- @Column (name="sub_attributes", nullable=false, length=2000)
- private String sub_attributes;
-
- @Column (name="version", nullable=false, length=2000)
- private String version;
-
- @Column (name="enumValues", nullable=false, length=2000)
- private String enumValues;
-
- @Column (name="annotation", nullable=false, length=2000)
- private String annotation;
-
- public String getSub_attributes() {
- return sub_attributes;
- }
-
- public void setSub_attributes(String sub_attributes) {
- this.sub_attributes = sub_attributes;
- }
-
- public String getVersion() {
- return version;
- }
-
- public void setVersion(String version) {
- this.version = version;
- }
-
- @ManyToOne
- @JoinColumn(name="imported_by")
- private UserInfo userCreatedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public MicroServiceModels(){
- }
-
- public MicroServiceModels(String userid){
-
- }
-
- public String getAttributes() {
- return attributes;
- }
-
- public void setAttributes(String attributes) {
- this.attributes = attributes;
- }
-
- public String getRef_attributes() {
- return ref_attributes;
- }
-
- public void setRef_attributes(String ref_attributes) {
- this.ref_attributes = ref_attributes;
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getDependency() {
- return dependency;
- }
-
- public void setDependency(String dependency) {
- this.dependency = dependency;
- }
-
- public String getModelName(){
- return this.modelName;
- }
-
- public void setModelName(String modelName){
- this.modelName = modelName;
- }
-
- public String getEnumValues() {
- return enumValues;
- }
-
- public void setEnumValues(String enumValues) {
- this.enumValues = enumValues;
- }
-
- public String getAnnotation() {
- return annotation;
- }
-
- public void setAnnotation(String annotation) {
- this.annotation = annotation;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Obadvice.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Obadvice.java
deleted file mode 100644
index 494092029..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Obadvice.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Transient;
-
-import com.att.research.xacml.api.Identifier;
-
-/**
- * The persistent class for the Obadvice database table.
- *
- */
-@Entity
-@Table(name="Obadvice")
-@NamedQuery(name="Obadvice.findAll", query="SELECT o FROM Obadvice o")
-public class Obadvice implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public static final String OBLIGATION = "Obligation";
- public static final String ADVICE = "Advice";
- public static final String EFFECT_PERMIT = "Permit";
- public static final String EFFECT_DENY = "Deny";
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="type", nullable=false)
- private String type;
-
- @Column(name="xacml_id", nullable=false, length=255)
- private String xacmlId;
-
- @Column(name="fulfill_on", nullable=true, length=32)
- private String fulfillOn;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- //bi-directional one-to-many association to Attribute Assignment
- @OneToMany(mappedBy="obadvice", orphanRemoval=true, cascade=CascadeType.REMOVE)
- private Set<ObadviceExpression> obadviceExpressions = new HashSet<>(2);
-
- @Column(name="created_by", nullable=false, length=255)
- private String createdBy;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", nullable=false, updatable=false)
- private Date createdDate;
-
- @Column(name="modified_by", nullable=false, length=255)
- private String modifiedBy;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- public Obadvice() {
- this.type = Obadvice.OBLIGATION;
- this.fulfillOn = Obadvice.EFFECT_PERMIT;
- }
-
- public Obadvice(String domain, String userid) {
- this.xacmlId = domain;
- this.type = Obadvice.OBLIGATION;
- this.fulfillOn = Obadvice.EFFECT_PERMIT;
- this.createdBy = userid;
- this.modifiedBy = userid;
- }
-
- public Obadvice(Identifier id, String userid) {
- this(id.stringValue(), userid);
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getCreatedBy() {
- return this.createdBy;
- }
-
- public void setCreatedBy(String createdBy) {
- this.createdBy = createdBy;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getFulfillOn() {
- return this.fulfillOn;
- }
-
- public void setFulfillOn(String fulfillOn) {
- this.fulfillOn = fulfillOn;
- }
-
- public String getModifiedBy() {
- return this.modifiedBy;
- }
-
- public void setModifiedBy(String modifiedBy) {
- this.modifiedBy = modifiedBy;
- }
-
- public String getType() {
- return this.type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public String getXacmlId() {
- return this.xacmlId;
- }
-
- public void setXacmlId(String xacmlId) {
- this.xacmlId = xacmlId;
- }
-
- public Set<ObadviceExpression> getObadviceExpressions() {
- return this.obadviceExpressions;
- }
-
- public void setObadviceExpressions(Set<ObadviceExpression> obadviceExpressions) {
- this.obadviceExpressions = obadviceExpressions;
- }
-
- public ObadviceExpression addObadviceExpression(ObadviceExpression obadviceExpression) {
- this.obadviceExpressions.add(obadviceExpression);
- obadviceExpression.setObadvice(this);
-
- return obadviceExpression;
- }
-
- public ObadviceExpression removeObadviceExpression(ObadviceExpression obadviceExpression) {
- this.obadviceExpressions.remove(obadviceExpression);
- obadviceExpression.setObadvice(null);
-
- return obadviceExpression;
- }
-
- public void removeAllExpressions() {
- if (this.obadviceExpressions == null) {
- return;
- }
- for (ObadviceExpression expression : this.obadviceExpressions) {
- expression.setObadvice(null);
- }
- this.obadviceExpressions.clear();
- }
-
- @Transient
- public Obadvice clone() {
- Obadvice obadvice = new Obadvice();
-
- obadvice.type = this.type;
- obadvice.xacmlId = this.xacmlId;
- obadvice.fulfillOn = this.fulfillOn;
- obadvice.description = this.description;
- obadvice.createdBy = this.createdBy;
- obadvice.modifiedBy = this.modifiedBy;
- for (ObadviceExpression exp: this.obadviceExpressions) {
- obadvice.addObadviceExpression(exp.clone());
- }
-
- return obadvice;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ObadviceExpression.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ObadviceExpression.java
deleted file mode 100644
index 1908b9dc9..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ObadviceExpression.java
+++ /dev/null
@@ -1,123 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToOne;
-import javax.persistence.Table;
-
-
-/**
- * The persistent class for the ObadviceExpressions database table.
- *
- */
-@Entity
-@Table(name="ObadviceExpressions")
-@NamedQuery(name="ObadviceExpression.findAll", query="SELECT o FROM ObadviceExpression o")
-public class ObadviceExpression implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public static final String EXPRESSION_APPLY = "Apply";
- public static final String EXPRESSION_SELECTOR = "Attribute Selector";
- public static final String EXPRESSION_VALUE = "Attribute Value";
- public static final String EXPRESSION_FUNCTION = "Function";
- public static final String EXPRESSION_REFERENCE = "Varable Reference";
- public static final String EXPRESSION_DESIGNATOR = "Attribute Designator";
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- //unidirectional one-to-one association to Attribute
- @OneToOne
- @JoinColumn(name="attribute_id")
- private Attribute attribute;
-
- @Column(name="type", nullable=false)
- private String type;
-
- /*
- @Lob
- @Column(name="expression", nullable=false)
- private byte[] expression;
- */
-
- //bi-directional many-to-one association to Obadvice
- @ManyToOne
- @JoinColumn(name="obadvice_id")
- private Obadvice obadvice;
-
- public ObadviceExpression() {
- type = EXPRESSION_VALUE;
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public Attribute getAttribute() {
- return this.attribute;
- }
-
- public void setAttribute(Attribute attribute) {
- this.attribute = attribute;
- }
-
- public String getType() {
- return this.type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public Obadvice getObadvice() {
- return this.obadvice;
- }
-
- public void setObadvice(Obadvice obadvice) {
- this.obadvice = obadvice;
- }
-
- public ObadviceExpression clone() {
- ObadviceExpression expression = new ObadviceExpression();
-
- expression.attribute = this.attribute;
- expression.type = this.type;
- expression.obadvice = this.obadvice;
-
- return expression;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PEPOptions.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PEPOptions.java
deleted file mode 100644
index ed520472c..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PEPOptions.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- *
- * */
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-
-
-@Entity
-@Table(name = "PEPOptions")
-@NamedQuery(name = "PEPOptions.findAll", query= "Select p from PEPOptions p")
-public class PEPOptions implements Serializable {
- private static final long serialVersionUID = 1L;
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name = "Id")
- private int id;
-
- @Column(name="PEP_NAME", nullable=false)
- @OrderBy("asc")
- private String pepName;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Column(name="Actions", nullable=true)
- @OrderBy("asc")
- private String actions;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- private static Log LOGGER = LogFactory.getLog(PEPOptions.class);
-
- public PEPOptions(){
-
- }
-
- public PEPOptions(String string, String userid) {
- this(string);
- }
-
- public PEPOptions(String domain) {
- this.pepName = domain;
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy =XacmlAdminAuthorization.getUserId();;
- } catch (Exception e) {
- LOGGER.error("Exception caused While adding Modified by Role"+e);
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "PEPOptions", "Exception caused While adding Modified by Role");
- }
- }
-
- public int getId() {
- return this.id;
- }
- public void setId(int id) {
- this.id = id;
- }
-
- public String getPepName() {
- return pepName;
- }
-
- public void setPepName(String pepName) {
- this.pepName = pepName;
- }
-
- public String getActions() {
- return actions;
- }
-
- public void setActions(String actions) {
- this.actions = actions;
- }
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfigParam.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfigParam.java
deleted file mode 100644
index d3724363f..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfigParam.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.*;
-
-
-/**
- * The persistent class for the PIPConfigParams database table.
- *
- */
-@Entity
-@Table(name="PIPConfigParams")
-@NamedQuery(name="PIPConfigParam.findAll", query="SELECT p FROM PIPConfigParam p")
-public class PIPConfigParam implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy=GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="PARAM_NAME", nullable=false, length=1024)
- private String paramName;
-
- @Column(name="PARAM_VALUE", nullable=false, length=2048)
- private String paramValue;
-
- @Column(name="PARAM_DEFAULT", nullable=true, length=2048)
- private String paramDefault = null;
-
- @Column(name="REQUIRED", nullable=false)
- private char required = '0';
-
- //bi-directional many-to-one association to PIPConfiguration
- @ManyToOne
- @JoinColumn(name="PIP_ID")
- private PIPConfiguration pipconfiguration;
-
- public PIPConfigParam() {
- }
-
- public PIPConfigParam(String param) {
- this.paramName = param;
- }
-
- public PIPConfigParam(String param, String value) {
- this(param);
- this.paramValue = value;
- }
-
- public PIPConfigParam(PIPConfigParam param) {
- this(param.getParamName(), param.getParamValue());
- this.paramDefault = param.getParamDefault();
- this.required = param.required;
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getParamName() {
- return this.paramName;
- }
-
- public void setParamName(String paramName) {
- this.paramName = paramName;
- }
-
- public String getParamValue() {
- return this.paramValue;
- }
-
- public void setParamValue(String paramValue) {
- this.paramValue = paramValue;
- }
-
- public String getParamDefault() {
- return paramDefault;
- }
-
- public void setParamDefault(String paramDefault) {
- this.paramDefault = paramDefault;
- }
-
- public char getRequired() {
- return required;
- }
-
- public void setRequired(char required) {
- this.required = required;
- }
-
- public PIPConfiguration getPipconfiguration() {
- return this.pipconfiguration;
- }
-
- public void setPipconfiguration(PIPConfiguration pipconfiguration) {
- this.pipconfiguration = pipconfiguration;
- }
-
- @Transient
- public boolean isRequired() {
- return (this.required == '1');
- }
-
- @Transient
- public void setRequired(boolean required) {
- if (required) {
- this.setRequired('1');
- } else {
- this.setRequired('0');
- }
- }
-
- @Transient
- @Override
- public String toString() {
- return "PIPConfigParam [id=" + id + ", paramName=" + paramName
- + ", paramValue=" + paramValue + ", required=" + required + "]";
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfiguration.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfiguration.java
deleted file mode 100644
index 70a0e845f..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPConfiguration.java
+++ /dev/null
@@ -1,537 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Transient;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-import org.openecomp.policy.xacml.api.XACMLErrorConstants;
-
-import com.att.research.xacml.api.pip.PIPException;
-import com.att.research.xacml.std.pip.engines.StdConfigurableEngine;
-import com.att.research.xacml.util.XACMLProperties;
-import com.google.common.base.Joiner;
-import com.google.common.base.Splitter;
-
-
-/**
- * The persistent class for the PIPConfiguration database table.
- *
- */
-@Entity
-@Table(name="PIPConfiguration")
-@NamedQuery(name="PIPConfiguration.findAll", query="SELECT p FROM PIPConfiguration p")
-public class PIPConfiguration implements Serializable {
- private static final long serialVersionUID = 1L;
- private static final Log logger = LogFactory.getLog(PIPConfiguration.class);
-
- @Id
- @GeneratedValue(strategy=GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="DESCRIPTION", nullable=true, length=2048)
- private String description;
-
- @Column(name="NAME", nullable=false, length=255)
- private String name;
-
- @Column(name="CLASSNAME", nullable=false, length=2048)
- private String classname;
-
- @Column(name="ISSUER", nullable=true, length=1024)
- private String issuer;
-
- @Column(name="READ_ONLY", nullable=false)
- private char readOnly = '0';
-
- @Column(name="REQUIRES_RESOLVER", nullable=false)
- private char requiresResolvers;
-
- @Column(name="CREATED_BY", nullable=false, length=255)
- private String createdBy = "guest";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="CREATED_DATE", nullable=false, updatable=false)
- private Date createdDate;
-
- @Column(name="MODIFIED_BY", nullable=false, length=255)
- private String modifiedBy = "guest";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="MODIFIED_DATE", nullable=false)
- private Date modifiedDate;
-
- //bi-directional many-to-one association to PIPConfigParam
- @OneToMany(mappedBy="pipconfiguration", orphanRemoval=true, cascade=CascadeType.REMOVE)
- private Set<PIPConfigParam> pipconfigParams = new HashSet<>();
-
- //bi-directional many-to-one association to PIPType
- @ManyToOne
- @JoinColumn(name="TYPE")
- private PIPType piptype;
-
- //bi-directional many-to-one association to PIPResolver
- @OneToMany(mappedBy="pipconfiguration", orphanRemoval=true, cascade=CascadeType.REMOVE)
- private Set<PIPResolver> pipresolvers = new HashSet<>();
-
- public PIPConfiguration() {
- }
-
- public PIPConfiguration(PIPConfiguration config, String user) {
- this.description = config.description;
- this.name = config.name;
- this.classname = config.classname;
- this.issuer = config.issuer;
- this.requiresResolvers = config.requiresResolvers;
- this.readOnly = config.readOnly;
- this.piptype = config.piptype;
- for (PIPConfigParam param : config.pipconfigParams) {
- this.addPipconfigParam(new PIPConfigParam(param));
- }
- for (PIPResolver resolver : config.pipresolvers) {
- this.addPipresolver(new PIPResolver(resolver));
- }
- }
-
- public PIPConfiguration(String id, Properties properties) throws PIPException {
- this.readProperties(id, properties);
- }
-
- public PIPConfiguration(String id, Properties properties, String user) throws PIPException {
- this.createdBy = user;
- this.modifiedBy = user;
- this.readProperties(id, properties);
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getClassname() {
- return classname;
- }
-
- public void setClassname(String classname) {
- this.classname = classname;
- }
-
- public String getIssuer() {
- return issuer;
- }
-
- public void setIssuer(String issuer) {
- this.issuer = issuer;
- }
-
- public char getReadOnly() {
- return readOnly;
- }
-
- public void setReadOnly(char readOnly) {
- this.readOnly = readOnly;
- }
-
- public char getRequiresResolvers() {
- return requiresResolvers;
- }
-
- public void setRequiresResolvers(char requireResolvers) {
- this.requiresResolvers = requireResolvers;
- }
-
- public Set<PIPConfigParam> getPipconfigParams() {
- return this.pipconfigParams;
- }
-
- public void setPipconfigParams(Set<PIPConfigParam> pipconfigParams) {
- this.pipconfigParams = pipconfigParams;
- }
-
- public PIPConfigParam addPipconfigParam(PIPConfigParam pipconfigParam) {
- getPipconfigParams().add(pipconfigParam);
- pipconfigParam.setPipconfiguration(this);
-
- return pipconfigParam;
- }
-
- public PIPConfigParam removePipconfigParam(PIPConfigParam pipconfigParam) {
- if (pipconfigParam == null) {
- return pipconfigParam;
- }
- getPipconfigParams().remove(pipconfigParam);
- pipconfigParam.setPipconfiguration(null);
-
- return pipconfigParam;
- }
-
- @Transient
- public void clearConfigParams() {
- while (this.pipconfigParams.isEmpty() == false) {
- this.removePipconfigParam(this.pipconfigParams.iterator().next());
- }
- }
-
- public PIPType getPiptype() {
- return this.piptype;
- }
-
- public void setPiptype(PIPType piptype) {
- this.piptype = piptype;
- }
-
- public Set<PIPResolver> getPipresolvers() {
- return this.pipresolvers;
- }
-
- public void setPipresolvers(Set<PIPResolver> pipresolvers) {
- this.pipresolvers = pipresolvers;
- }
-
- public PIPResolver addPipresolver(PIPResolver pipresolver) {
- getPipresolvers().add(pipresolver);
- pipresolver.setPipconfiguration(this);
-
- return pipresolver;
- }
-
- public PIPResolver removePipresolver(PIPResolver pipresolver) {
- getPipresolvers().remove(pipresolver);
- pipresolver.setPipconfiguration(null);
-
- return pipresolver;
- }
-
- public String getCreatedBy() {
- return createdBy;
- }
-
- public void setCreatedBy(String createdBy) {
- this.createdBy = createdBy;
- }
-
- public Date getCreatedDate() {
- return createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getModifiedBy() {
- return modifiedBy;
- }
-
- public void setModifiedBy(String modifiedBy) {
- this.modifiedBy = modifiedBy;
- }
-
- public Date getModifiedDate() {
- return modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
- @Transient
- public boolean isReadOnly() {
- return (this.readOnly == '1');
- }
-
- @Transient
- public void setReadOnly(boolean readOnly) {
- if (readOnly) {
- this.readOnly = '1';
- } else {
- this.readOnly = '0';
- }
- }
-
- @Transient
- public boolean requiresResolvers() {
- return (this.requiresResolvers == '1');
- }
-
- @Transient
- public void setRequiresResolvers(boolean requires) {
- if (requires) {
- this.requiresResolvers = '1';
- } else {
- this.requiresResolvers = '0';
- }
- }
-
- @Transient
- public static Collection<PIPConfiguration> importPIPConfigurations(Properties properties) {
- Collection<PIPConfiguration> configurations = new ArrayList<>();
- String engines = properties.getProperty(XACMLProperties.PROP_PIP_ENGINES);
- if (engines == null || engines.isEmpty()) {
- return configurations;
- }
- for (String id : Splitter.on(',').trimResults().omitEmptyStrings().split(engines)) {
- PIPConfiguration configuration;
- try {
- String user = "super-admin";
- configuration = new PIPConfiguration(id, properties, user);
- configuration.setCreatedBy(user);
- configuration.setModifiedBy(user);
- configurations.add(configuration);
- } catch (PIPException e) {
- logger.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + "Import failed: " + e.getLocalizedMessage());
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "PIPConfiguration", "Import failed");
- }
- }
-
- return configurations;
- }
-
- @Transient
- protected void readProperties(String id, Properties properties) throws PIPException {
- //
- // Save the id if we don't have one already
- //
-
- if (this.id == 0) {
- try {
- this.id = Integer.parseInt(id);
- } catch (NumberFormatException e) {
- logger.error(XACMLErrorConstants.ERROR_PROCESS_FLOW + "Convert id to integer failed: " + id);
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "PIPConfiguration", "Convert id to integer failed");
- }
- }
- //
- // Get its classname, this MUST exist.
- //
- this.classname = properties.getProperty(id + ".classname");
- if (this.classname == null) {
- throw new PIPException("PIP Engine defined without a classname");
- }
- //
- // Go through each property
- //
- for (Object name : properties.keySet()) {
- if (name.toString().startsWith(id) == false) {
- continue;
- }
- if (name.equals(id + ".classname")) {
- //
- // We already saved this
- //
- } else if (name.equals(id + "." + StdConfigurableEngine.PROP_NAME)) {
- this.name = properties.getProperty(name.toString());
- } else if (name.equals(id + "." + StdConfigurableEngine.PROP_DESCRIPTION)) {
- this.description = properties.getProperty(name.toString());
- } else if (name.equals(id + "." + StdConfigurableEngine.PROP_ISSUER)) {
- this.issuer = properties.getProperty(name.toString());
- } else if (name.equals(id + ".resolvers")) {
- //
- // It has resolvers, make sure this is set to true if
- // it has been already.
- //
- this.setRequiresResolvers(true);
- //
- // Parse the resolvers
- //
- Collection<PIPResolver> resolvers = PIPResolver.importResolvers(id + ".resolver",
- properties.getProperty(name.toString()),
- properties,"super-admin"
- );
- for (PIPResolver resolver : resolvers) {
- this.addPipresolver(resolver);
- }
- } else if (name.toString().startsWith(id + ".resolver")) {
- //
- // Ignore, the PIPResolver will parse these values
- //
- } else {
- //
- // Config Parameter
- //
- this.addPipconfigParam(new PIPConfigParam(name.toString().substring(id.length() + 1),
- properties.getProperty(name.toString())));
- }
- }
- //
- // Make sure we have a name at least
- //
- if (this.name == null) {
- this.name = id;
- }
- }
-
-
- @Transient
- public Map<String, String> getConfiguration(String name) {
- String prefix;
- if (name == null) {
- prefix = Integer.toString(this.id);
- } else {
- prefix = name;
- }
- if (prefix.endsWith(".") == false) {
- prefix = prefix + ".";
- }
- Map<String, String> map = new HashMap<>();
- map.put(prefix + "classname", this.classname);
- map.put(prefix + "name", this.name);
- if (this.description != null) {
- map.put(prefix + "description", this.description);
- }
- if (this.issuer != null) {
- map.put(prefix + "issuer", this.issuer);
- }
-
- for (PIPConfigParam param : this.pipconfigParams) {
- map.put(prefix + param.getParamName(), param.getParamValue());
- }
-
- List<String> ids = new ArrayList<>();
- Iterator<PIPResolver> iter = this.pipresolvers.iterator();
- while (iter.hasNext()) {
- PIPResolver resolver = iter.next();
- String id = Integer.toString(resolver.getId());
- Map<String, String> resolverMap = resolver.getConfiguration(prefix + "resolver." + id);
- map.putAll(resolverMap);
- ids.add(id);
- }
- if (ids.size() > 0) {
- map.put(prefix + "resolvers", Joiner.on(',').join(ids));
- }
- return map;
- }
-
- @Transient
- public Properties generateProperties(String name) {
- String prefix;
- if (name == null) {
- prefix = Integer.toString(this.id);
- } else {
- if (name.endsWith(".")) {
- prefix = name;
- } else {
- prefix = name + ".";
- }
- }
- Properties props = new Properties();
- props.setProperty("xacml.pip.engines", name);
- props.setProperty(prefix + "classname", this.classname);
- props.setProperty(prefix + "name", this.name);
- if (this.description != null) {
- props.setProperty(prefix + "description", this.description);
- }
- if (this.issuer != null && this.issuer.isEmpty() == false) {
- props.setProperty(prefix + "issuer", this.issuer);
- }
-
- for (PIPConfigParam param : this.pipconfigParams) {
- props.setProperty(prefix + param.getParamName(), param.getParamValue());
- }
-
- List<String> ids = new ArrayList<>();
- Iterator<PIPResolver> iter = this.pipresolvers.iterator();
- while (iter.hasNext()) {
- PIPResolver resolver = iter.next();
- String id = Integer.toString(resolver.getId());
- resolver.generateProperties(props, prefix + "resolver." + id);
- ids.add(id);
- }
- if (ids.size() > 0) {
- props.setProperty(prefix + "resolvers", Joiner.on(',').join(ids));
- }
- return props;
- }
-
- @Transient
- @Override
- public String toString() {
- return "PIPConfiguration [id=" + id + ", piptype=" + piptype
- + ", classname=" + classname + ", name=" + name
- + ", description=" + description + ", issuer=" + issuer
- + ", readOnly=" + readOnly + ", requiresResolvers="
- + requiresResolvers + ", createdBy=" + createdBy
- + ", createdDate=" + createdDate + ", modifiedBy=" + modifiedBy
- + ", modifiedDate=" + modifiedDate + ", pipconfigParams="
- + pipconfigParams + ", pipresolvers=" + pipresolvers + "]";
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPResolver.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPResolver.java
deleted file mode 100644
index 618c1a4ea..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPResolver.java
+++ /dev/null
@@ -1,365 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Date;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Set;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Transient;
-
-import com.att.research.xacml.api.pip.PIPException;
-import com.att.research.xacml.std.pip.engines.StdConfigurableEngine;
-import com.google.common.base.Splitter;
-
-
-/**
- * The persistent class for the PIPResolver database table.
- *
- */
-@Entity
-@Table(name="PIPResolver")
-@NamedQuery(name="PIPResolver.findAll", query="SELECT p FROM PIPResolver p")
-public class PIPResolver implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy=GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="DESCRIPTION", nullable=true, length=2048)
- private String description;
-
- @Column(name="NAME", nullable=false, length=255)
- private String name;
-
- @Column(name="ISSUER", nullable=true, length=1024)
- private String issuer;
-
- @Column(name="CLASSNAME", nullable=false, length=2048)
- private String classname;
-
- @Column(name="READ_ONLY", nullable=false)
- private char readOnly = '0';
-
- @Column(name="CREATED_BY", nullable=false, length=255)
- private String createdBy = "guest";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="CREATED_DATE", nullable=false, updatable=false)
- private Date createdDate;
-
- @Column(name="MODIFIED_BY", nullable=false, length=255)
- private String modifiedBy = "guest";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="MODIFIED_DATE", nullable=false)
- private Date modifiedDate;
-
- //bi-directional many-to-one association to PIPConfiguration
- @ManyToOne
- @JoinColumn(name="PIP_ID")
- private PIPConfiguration pipconfiguration;
-
- //bi-directional many-to-one association to PIPResolverParam
- @OneToMany(mappedBy="pipresolver", orphanRemoval=true, cascade=CascadeType.REMOVE)
- private Set<PIPResolverParam> pipresolverParams = new HashSet<>();
-
- public PIPResolver() {
- }
-
- public PIPResolver(String prefix, Properties properties, String user) throws PIPException {
- this.createdBy = user;
- this.modifiedBy = user;
- this.readOnly = '0';
- this.readProperties(prefix, properties);
- }
-
- public PIPResolver(PIPResolver resolver) {
- this.name = resolver.name;
- this.description = resolver.description;
- this.issuer = resolver.issuer;
- this.classname = resolver.classname;
- this.readOnly = resolver.readOnly;
- for (PIPResolverParam param : this.pipresolverParams) {
- this.addPipresolverParam(new PIPResolverParam(param));
- }
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-
- public String getIssuer() {
- return issuer;
- }
-
- public void setIssuer(String issuer) {
- this.issuer = issuer;
- }
-
- public String getClassname() {
- return classname;
- }
-
- public void setClassname(String classname) {
- this.classname = classname;
- }
-
- public char getReadOnly() {
- return readOnly;
- }
-
- public void setReadOnly(char readOnly) {
- this.readOnly = readOnly;
- }
-
- public String getCreatedBy() {
- return createdBy;
- }
-
- public void setCreatedBy(String createdBy) {
- this.createdBy = createdBy;
- }
-
- public Date getCreatedDate() {
- return createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getModifiedBy() {
- return modifiedBy;
- }
-
- public void setModifiedBy(String modifiedBy) {
- this.modifiedBy = modifiedBy;
- }
-
- public Date getModifiedDate() {
- return modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
- public PIPConfiguration getPipconfiguration() {
- return this.pipconfiguration;
- }
-
- public void setPipconfiguration(PIPConfiguration pipconfiguration) {
- this.pipconfiguration = pipconfiguration;
- }
-
- public Set<PIPResolverParam> getPipresolverParams() {
- return this.pipresolverParams;
- }
-
- public void setPipresolverParams(Set<PIPResolverParam> pipresolverParams) {
- this.pipresolverParams = pipresolverParams;
- }
-
- public PIPResolverParam addPipresolverParam(PIPResolverParam pipresolverParam) {
- getPipresolverParams().add(pipresolverParam);
- pipresolverParam.setPipresolver(this);
-
- return pipresolverParam;
- }
-
- public PIPResolverParam removePipresolverParam(PIPResolverParam pipresolverParam) {
- if (pipresolverParam == null) {
- return pipresolverParam;
- }
- getPipresolverParams().remove(pipresolverParam);
- pipresolverParam.setPipresolver(null);
-
- return pipresolverParam;
- }
-
- @Transient
- public void clearParams() {
- while (this.pipresolverParams.isEmpty() == false) {
- this.removePipresolverParam(this.pipresolverParams.iterator().next());
- }
- }
-
- @Transient
- public boolean isReadOnly() {
- return (this.readOnly == '1');
- }
-
- @Transient
- public void setReadOnly(boolean readOnly) {
- if (readOnly) {
- this.readOnly = '1';
- } else {
- this.readOnly = '0';
- }
- }
-
- @Transient
- public static Collection<PIPResolver> importResolvers(String prefix, String list, Properties properties, String user) throws PIPException {
- Collection<PIPResolver> resolvers = new ArrayList<>();
- for (String id : Splitter.on(',').trimResults().omitEmptyStrings().split(list)) {
- resolvers.add(new PIPResolver(prefix + "." + id, properties, user));
- }
- return resolvers;
- }
-
- @Transient
- protected void readProperties(String prefix, Properties properties) throws PIPException {
- //
- // Get its classname, this MUST exist.
- //
- this.classname = properties.getProperty(prefix + ".classname");
- if (this.classname == null) {
- throw new PIPException("PIP Engine defined without a classname");
- }
- //
- // Go through each property
- //
- for (Object name : properties.keySet()) {
- if (name.toString().startsWith(prefix) == false) {
- continue;
- }
- if (name.equals(prefix + ".classname")) {
- //
- // We already saved this
- //
- } else if (name.equals(prefix + "." + StdConfigurableEngine.PROP_NAME)) {
- this.name = properties.getProperty(name.toString());
- } else if (name.equals(prefix + "." + StdConfigurableEngine.PROP_DESCRIPTION)) {
- this.description = properties.getProperty(name.toString());
- } else if (name.equals(prefix + "." + StdConfigurableEngine.PROP_ISSUER)) {
- this.issuer = properties.getProperty(name.toString());
- } else {
- this.addPipresolverParam(new PIPResolverParam(name.toString().substring(prefix.length() + 1),
- properties.getProperty(name.toString())));
- }
- }
- }
-
- @Transient
- public Map<String, String> getConfiguration(String prefix) {
- Map<String, String> map = new HashMap<>();
- if (prefix.endsWith(".") == false) {
- prefix = prefix + ".";
- }
- map.put(prefix + "classname", this.classname);
- map.put(prefix + "name", this.name);
- if (this.description != null) {
- map.put(prefix + "description", this.description);
- }
- if (this.issuer != null && this.issuer.isEmpty() != false) {
- map.put(prefix + "issuer", this.issuer);
- }
- for (PIPResolverParam param : this.pipresolverParams) {
- map.put(prefix + param.getParamName(), param.getParamValue());
- }
- return map;
- }
-
- @Transient
- public void generateProperties(Properties props, String prefix) {
- if (prefix.endsWith(".") == false) {
- prefix = prefix + ".";
- }
- props.setProperty(prefix + "classname", this.classname);
- props.setProperty(prefix + "name", this.name);
- if (this.description != null) {
- props.setProperty(prefix + "description", this.description);
- }
- if (this.issuer != null && this.issuer.isEmpty() != false) {
- props.setProperty(prefix + "issuer", this.issuer);
- }
- for (PIPResolverParam param : this.pipresolverParams) {
- props.setProperty(prefix + param.getParamName(), param.getParamValue());
- }
- }
-
- @Transient
- @Override
- public String toString() {
- return "PIPResolver [id=" + id + ", classname=" + classname + ", name="
- + name + ", description=" + description + ", issuer=" + issuer
- + ", readOnly=" + readOnly + ", createdBy=" + createdBy
- + ", createdDate=" + createdDate + ", modifiedBy=" + modifiedBy
- + ", modifiedDate=" + modifiedDate + ", pipresolverParams="
- + pipresolverParams + "]";
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPResolverParam.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPResolverParam.java
deleted file mode 100644
index 957b105d1..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPResolverParam.java
+++ /dev/null
@@ -1,147 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.*;
-
-
-/**
- * The persistent class for the PIPResolverParams database table.
- *
- */
-@Entity
-@Table(name="PIPResolverParams")
-@NamedQuery(name="PIPResolverParam.findAll", query="SELECT p FROM PIPResolverParam p")
-public class PIPResolverParam implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy=GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="PARAM_NAME", nullable=false, length=1024)
- private String paramName;
-
- @Column(name="PARAM_VALUE", nullable=false, length=2048)
- private String paramValue;
-
- @Column(name="PARAM_DEFAULT", nullable=true, length=2048)
- private String paramDefault;
-
- @Column(name="REQUIRED", nullable=false)
- private char required = '0';
-
- //bi-directional many-to-one association to PIPResolver
- @ManyToOne
- @JoinColumn(name="ID_RESOLVER")
- private PIPResolver pipresolver;
-
- public PIPResolverParam() {
- }
-
- public PIPResolverParam(String name) {
- this.paramName = name;
- }
-
- public PIPResolverParam(String name, String value) {
- this(name);
- this.paramValue = value;
- }
-
- public PIPResolverParam(PIPResolverParam param) {
- this(param.getParamName(), param.getParamValue());
- this.paramDefault = param.getParamDefault();
- this.required = param.required;
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getParamName() {
- return this.paramName;
- }
-
- public void setParamName(String paramName) {
- this.paramName = paramName;
- }
-
- public String getParamValue() {
- return this.paramValue;
- }
-
- public void setParamValue(String paramValue) {
- this.paramValue = paramValue;
- }
-
- public String getParamDefault() {
- return paramDefault;
- }
-
- public void setParamDefault(String paramDefault) {
- this.paramDefault = paramDefault;
- }
-
- public char getRequired() {
- return required;
- }
-
- public void setRequired(char required) {
- this.required = required;
- }
-
- public PIPResolver getPipresolver() {
- return this.pipresolver;
- }
-
- public void setPipresolver(PIPResolver pipresolver) {
- this.pipresolver = pipresolver;
- }
-
- @Transient
- public boolean isRequired() {
- return this.required == '1';
- }
-
- @Transient
- public void setRequired(boolean required) {
- if (required) {
- this.required = '1';
- } else {
- this.required = '0';
- }
- }
-
- @Transient
- @Override
- public String toString() {
- return "PIPResolverParam [id=" + id + ", paramName=" + paramName
- + ", paramValue=" + paramValue + ", required=" + required + "]";
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPType.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPType.java
deleted file mode 100644
index 964a15412..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PIPType.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Set;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-
-/**
- * The persistent class for the PIPType database table.
- *
- */
-@Entity
-@Table(name="PIPType")
-@NamedQuery(name="PIPType.findAll", query="SELECT p FROM PIPType p")
-public class PIPType implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public static final String TYPE_SQL = "SQL";
- public static final String TYPE_LDAP = "LDAP";
- public static final String TYPE_CSV = "CSV";
- public static final String TYPE_HYPERCSV = "Hyper-CSV";
- public static final String TYPE_CUSTOM = "Custom";
-
- @Id
- @GeneratedValue(strategy=GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="type", nullable=false, length=45)
- private String type;
-
- //bi-directional many-to-one association to PIPConfiguration
- @OneToMany(mappedBy="piptype")
- private Set<PIPConfiguration> pipconfigurations;
-
- public PIPType() {
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getType() {
- return this.type;
- }
-
- public void setType(String type) {
- this.type = type;
- }
-
- public Set<PIPConfiguration> getPipconfigurations() {
- return this.pipconfigurations;
- }
-
- public void setPipconfigurations(Set<PIPConfiguration> pipconfigurations) {
- this.pipconfigurations = pipconfigurations;
- }
-
- public PIPConfiguration addPipconfiguration(PIPConfiguration pipconfiguration) {
- getPipconfigurations().add(pipconfiguration);
- pipconfiguration.setPiptype(this);
-
- return pipconfiguration;
- }
-
- public PIPConfiguration removePipconfiguration(PIPConfiguration pipconfiguration) {
- getPipconfigurations().remove(pipconfiguration);
- pipconfiguration.setPiptype(null);
-
- return pipconfiguration;
- }
-
- @Transient
- public boolean isSQL() {
- return this.type.equals(TYPE_SQL);
- }
-
- @Transient
- public boolean isLDAP() {
- return this.type.equals(TYPE_LDAP);
- }
-
- @Transient
- public boolean isCSV() {
- return this.type.equals(TYPE_CSV);
- }
-
- @Transient
- public boolean isHyperCSV() {
- return this.type.equals(TYPE_HYPERCSV);
- }
-
- @Transient
- public boolean isCustom() {
- return this.type.equals(TYPE_CUSTOM);
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PdpEntity.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PdpEntity.java
deleted file mode 100644
index c7d666056..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PdpEntity.java
+++ /dev/null
@@ -1,241 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-/*
- * The Entity class to persist a policy object and its configuration data
- */
-
-/**
- *
- */
-@Entity
-//Add a non-unique index and a constraint that says the combo of policyName and scopeId must be unique
-@Table(name="PdpEntity")
-@NamedQueries({
- @NamedQuery(name="PdpEntity.findAll", query="SELECT e FROM PdpEntity e "),
- @NamedQuery(name="PdpEntity.deleteAll", query="DELETE FROM PdpEntity WHERE 1=1")
-})
-
-public class PdpEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- //@GeneratedValue(strategy = GenerationType.SEQUENCE, generator="seqPdp")
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column (name="pdpKey")
- private long pdpKey;
-
- @Column (name="pdpId", nullable=false, unique=false, length=255)
- private String pdpId;
-
- @Column(name="pdpName", nullable=false, unique=false, length=255)
- private String pdpName;
-
- @Column(name="jmxPort", nullable=false, unique=false)
- private int jmxPort;
-
-
- @ManyToOne(optional=false)
- @JoinColumn(name="groupKey", referencedColumnName="groupKey")
- private GroupEntity groupEntity;
-
- @Column(name="created_by", nullable=false, length=255)
- private String createdBy = "guest";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Column(name="description", nullable=false, length=2048)
- private String description = "NoDescription";
-
- @Column(name="modified_by", nullable=false, length=255)
- private String modifiedBy = "guest";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @Column(name="deleted", nullable=false)
- private boolean deleted = false;
-
- public PdpEntity() {
- super();
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- }
-
- public long getPdpKey(){
- return pdpKey;
- }
- /**
- * @return the policyId
- */
- public String getPdpId() {
- return pdpId;
- }
-
- public void setPdpId(String id){
- pdpId = id;
- }
- /**
- * @param policyId cannot be set
- */
-
- public String getPdpName() {
- return pdpName;
- }
-
- public void setPdpName(String groupName) {
- this.pdpName = groupName;
- }
-
-
-
- /**
- * @return the configurationDataEntity
- */
- public GroupEntity getGroup() {
- return groupEntity;
- }
-
- /**
- * @param configurationDataEntity the configurationDataEntity to set
- */
- public void setGroup(GroupEntity group) {
- this.groupEntity = group;
- }
-
-
-
- /**
- * @return the createdBy
- */
- public String getCreatedBy() {
- return createdBy;
- }
-
- /**
- * @param createdBy the createdBy to set
- */
- public void setCreatedBy(String createdBy) {
- this.createdBy = createdBy;
- }
-
- /**
- * @return the description
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @param description the description to set
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
- /**
- * @return the modifiedBy
- */
- public String getModifiedBy() {
- return modifiedBy;
- }
-
- /**
- * @param modifiedBy the modifiedBy to set
- */
- public void setModifiedBy(String modifiedBy) {
- this.modifiedBy = modifiedBy;
- }
-
- /**
- * @return the version
- */
- public int getJmxPort() {
- return jmxPort;
- }
-
- public void setJmxPort(int jmxPort){
- this.jmxPort = jmxPort;
- }
-
- /**
- * @return the createdDate
- */
- public Date getCreatedDate() {
- return createdDate;
- }
-
- /**
- * @return the modifiedDate
- */
- public Date getModifiedDate() {
- return modifiedDate;
- }
-
- /**
- * @return the deleted
- */
- public boolean isDeleted() {
- return deleted;
- }
-
- /**
- * @param deleted the deleted to set
- */
- public void setDeleted(boolean deleted) {
- this.deleted = deleted;
- }
-
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyAlgorithms.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyAlgorithms.java
deleted file mode 100644
index eb46ae0dc..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyAlgorithms.java
+++ /dev/null
@@ -1,116 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-import com.att.research.xacml.api.Identifier;
-
-@Entity
-@Table(name="PolicyAlgorithms")
-@NamedQuery(name="PolicyAlgorithms.findAll", query="SELECT d FROM PolicyAlgorithms d")
-public class PolicyAlgorithms implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public static final char STANDARD = 'S';
- public static final char CUSTOM = 'C';
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="is_standard", nullable=false)
- private char isStandard;
-
- @Column(name="xacml_id", nullable=false, unique=true, length=255)
- private String xacmlId;
-
- @Column(name="short_name", nullable=false, length=64)
- private String shortName;
-
- public PolicyAlgorithms(Identifier identifier, char standard) {
- this.isStandard = standard;
- if (identifier != null) {
- this.xacmlId = identifier.stringValue();
- }
- }
-
- public PolicyAlgorithms(Identifier identifier) {
- this(identifier, PolicyAlgorithms.STANDARD);
- }
-
- public PolicyAlgorithms() {
- this(null, PolicyAlgorithms.STANDARD);
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public char getIsStandard() {
- return this.isStandard;
- }
-
- public void setIsStandard(char isStandard) {
- this.isStandard = isStandard;
- }
-
- @Transient
- public boolean isStandard() {
- return (this.isStandard == PolicyAlgorithms.STANDARD);
- }
-
- @Transient
- public boolean isCustom() {
- return (this.isStandard == PolicyAlgorithms.CUSTOM);
- }
-
- public String getXacmlId() {
- return this.xacmlId;
- }
-
- public void setXacmlId(String xacmlId) {
- this.xacmlId = xacmlId;
- }
-
- public String getShortName() {
- return shortName;
- }
-
- public void setShortName(String shortName) {
- this.shortName = shortName;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyDBDaoEntity.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyDBDaoEntity.java
deleted file mode 100644
index c395ab49a..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyDBDaoEntity.java
+++ /dev/null
@@ -1,150 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-/*
- * The Entity class to persist a PolicyDBDaoEntity object for registration of PolicyDBDao
- */
-
-/**
- *
- */
-@Entity
-@Table(name="PolicyDBDaoEntity")
-
-@NamedQueries({
- @NamedQuery(name="PolicyDBDaoEntity.findAll", query="SELECT e FROM PolicyDBDaoEntity e "),
- @NamedQuery(name="PolicyDBDaoEntity.deleteAll", query="DELETE FROM PolicyDBDaoEntity WHERE 1=1")
-})
-
-public class PolicyDBDaoEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @Column(name="policyDBDaoUrl", nullable=false, unique=true)
- private String policyDBDaoUrl;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- //username for the pap server that registered this PolicyDBDaoEntity
- @Column(name="username")
- private String username;
-
- //AES encrypted password for the pap server that registered this PolicyDBDaoEntity
- @Column(name="password")
- private String password;
-
- //A column to allow some descriptive text. For example: Atlanta data center
- @Column(name="description", nullable=false, length=2048)
- private String description = "NoDescription";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- public PolicyDBDaoEntity() {
- super();
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- }
-
- /**
- * @return the policyDBDaoUrl
- */
- public String getPolicyDBDaoUrl() {
- return policyDBDaoUrl;
- }
-
- /**
- * @param url the policyDBDaoUrl to set
- */
- public void setPolicyDBDaoUrl(String url) {
- this.policyDBDaoUrl = url;
- }
-
- /**
- * @return the description
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @param description the description to set
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
- /**
- * @return the createdDate
- */
- public Date getCreatedDate() {
- return createdDate;
- }
-
- /**
- * @return the modifiedDate
- */
- public Date getModifiedDate() {
- return modifiedDate;
- }
-
- public String getUsername(){
- return this.username;
- }
- public void setUsername(String username){
- this.username = username;
- }
- public String getPassword(){
- return this.password;
- }
- public void setPassword(String password){
- this.password = password;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyEditorScopes.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyEditorScopes.java
deleted file mode 100644
index daf97b3ed..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyEditorScopes.java
+++ /dev/null
@@ -1,159 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-
-@Entity
-@Table(name="PolicyEditorScopes")
-@NamedQuery(name="PolicyEditorScopes.findAll", query="SELECT p FROM PolicyEditorScopes p ")
-public class PolicyEditorScopes implements Serializable{
- private static final long serialVersionUID = 1L;
- private static Log logger = LogFactory.getLog(PolicyEditorScopes.class);
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="scopeName", nullable=false, unique=true)
- @OrderBy("asc")
- private String scopeName;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public PolicyEditorScopes() {
- }
-
- public PolicyEditorScopes(String string, String userid) {
- this(domain);
- }
-
- public PolicyEditorScopes(String domain) {
- this.scopeName = domain;
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy =XacmlAdminAuthorization.getUserId();
- } catch (Exception e) {
- logger.error("Exception caused While adding Modified by Role"+e);
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "PolicyEditorScopes", "Exception caused While adding Modified by Role");
- }
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getScopeName() {
- return scopeName;
- }
-
- public void setScopeName(String scopeName) {
- this.scopeName = scopeName;
- }
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyEntity.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyEntity.java
deleted file mode 100644
index 7b938e461..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyEntity.java
+++ /dev/null
@@ -1,308 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.Lob;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.OneToOne;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-import javax.persistence.Version;
-
-import com.fasterxml.jackson.annotation.JsonBackReference;
-import com.fasterxml.jackson.annotation.JsonManagedReference;
-
-/*
- * The Entity class to persist a policy object and its configuration data
- */
-
-/**
- *
- */
-@Entity
-//Add a non-unique index and a constraint that says the combo of policyName and scopeId must be unique
-@Table(name="PolicyEntity")
-
-@NamedQueries({
- @NamedQuery(name="PolicyEntity.findAll", query="SELECT e FROM PolicyEntity e "),
- @NamedQuery(name="PolicyEntity.findAllByDeletedFlag", query="SELECT e FROM PolicyEntity e WHERE e.deleted = :deleted"),
- @NamedQuery(name="PolicyEntity.FindById", query="SELECT e FROM PolicyEntity e WHERE e.policyId = :id"),
- @NamedQuery(name="PolicyEntity.deleteAll", query="DELETE FROM PolicyEntity WHERE 1=1"),
- @NamedQuery(name="PolicyEntity.findByNameAndScope", query="SELECT e FROM PolicyEntity e WHERE e.policyName = :name AND e.scope = :scope")
-})
-
-public class PolicyEntity implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column (name="policyId")
- @JsonBackReference
- private long policyId;
-
- @Column(name="policyName", nullable=false, unique=false, length=255)
- private String policyName;
-
- //The scope is the directory structure in dot notation. For example: org.openecomp.myproject
- @Column(name="scope", nullable=false, unique=false, length=255)
- private String scope;
-
- @Version
- @Column(name="version")
- private int version;
-
- //not going to be used
- @Column(name="policyVersion")
- private int policyVersion = 0;
-
- @Lob
- @Column(name="policyData", nullable=false, columnDefinition="TEXT")
- private String policyData = "NoData";
-
- @OneToOne(optional=true, orphanRemoval=true)
- @JoinColumn(name="configurationDataId")
- @JsonManagedReference
- private ConfigurationDataEntity configurationDataEntity;
-
- @OneToOne(optional=true, orphanRemoval=true)
- @JoinColumn(name="actionBodyId")
- @JsonManagedReference
- private ActionBodyEntity actionBodyEntity;
-
- @Column(name="created_by", nullable=false, length=255)
- private String createdBy = "guest";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Column(name="description", nullable=false, length=2048)
- private String description = "NoDescription";
-
- @Column(name="modified_by", nullable=false, length=255)
- private String modifiedBy = "guest";
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @Column(name="deleted", nullable=false)
- private boolean deleted = false;
-
- public PolicyEntity() {
- super();
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- }
-
- /*
- public void resetPolicyVersion(){
- this.policyVersion = 1;
- }
- public void advancePolicyVersion(){
- this.policyVersion++;
- }
- public int getPolicyVersion(){
- return this.policyVersion;
- }
- public void setPolicyVersion(int polVer){
- this.policyVersion = polVer;
- }
- */
-
- /**
- * @return the policyId
- */
- public long getPolicyId() {
- return policyId;
- }
-
- /**
- * @param policyId cannot be set
- */
-
- public String getPolicyName() {
- return policyName;
- }
-
- public void setPolicyName(String policyName) {
- this.policyName = policyName;
- }
-
- /**
- * @return the policyData
- */
- public String getPolicyData() {
- return policyData;
- }
-
- /**
- * @param policyData the policyData to set
- */
- public void setPolicyData(String policyData) {
- this.policyData = policyData;
- }
-
- /**
- * @return the configurationDataEntity
- */
- public ConfigurationDataEntity getConfigurationData() {
- return configurationDataEntity;
- }
-
- /**
- * @param configurationDataEntity the configurationDataEntity to set
- */
- public void setConfigurationData(ConfigurationDataEntity configurationDataEntity) {
- this.configurationDataEntity = configurationDataEntity;
- }
-
- /**
- * @return the actionBodyEntity
- */
- public ActionBodyEntity getActionBodyEntity() {
- return actionBodyEntity;
- }
-
- /**
- * @param actionBodyEntity the actionBodyEntity to set
- */
- public void setActionBodyEntity(ActionBodyEntity actionBodyEntity) {
- this.actionBodyEntity = actionBodyEntity;
- }
-
- /**
- * @return the scope
- */
- public String getScope() {
- return scope;
- }
-
- /**
- * @param scope the scope to set
- */
- public void setScope(String scope) {
- this.scope = scope;
- }
-
- /**
- * @return the createdBy
- */
- public String getCreatedBy() {
- return createdBy;
- }
-
- /**
- * @param createdBy the createdBy to set
- */
- public void setCreatedBy(String createdBy) {
- this.createdBy = createdBy;
- }
-
- /**
- * @return the description
- */
- public String getDescription() {
- return description;
- }
-
- /**
- * @param description the description to set
- */
- public void setDescription(String description) {
- this.description = description;
- }
-
- /**
- * @return the modifiedBy
- */
- public String getModifiedBy() {
- return modifiedBy;
- }
-
- /**
- * @param modifiedBy the modifiedBy to set
- */
- public void setModifiedBy(String modifiedBy) {
- this.modifiedBy = modifiedBy;
- }
-
- /**
- * @return the version
- */
- public int getVersion() {
- return version;
- }
-
- /**
- * @return the createdDate
- */
- public Date getCreatedDate() {
- return createdDate;
- }
-
- /**
- * @return the modifiedDate
- */
- public Date getModifiedDate() {
- return modifiedDate;
- }
-
- /**
- * @return the deleted
- */
- public boolean isDeleted() {
- return deleted;
- }
-
- /**
- * @param deleted the deleted to set
- */
- public void setDeleted(boolean deleted) {
- this.deleted = deleted;
- }
-
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyGroupEntity.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyGroupEntity.java
deleted file mode 100644
index 85c42ee48..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyGroupEntity.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="PolicyGroupEntity")
-@NamedQuery(name="PolicyGroupEntity.findAll", query="SELECT p FROM PolicyGroupEntity p ")
-public class PolicyGroupEntity implements Serializable{
-
- private static final long serialVersionUID = 1L;
-
- @Id
- @Column(name="groupKey")
- private int groupKey;
-
- @Id
- @Column(name="policyid")
- private int policyid;
-
- public int getGroupKey() {
- return groupKey;
- }
-
- public void setGroupKey(int groupKey) {
- this.groupKey = groupKey;
- }
-
- public int getPolicyid() {
- return policyid;
- }
-
- public void setPolicyid(int policyid) {
- this.policyid = policyid;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyManagement.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyManagement.java
deleted file mode 100644
index 3f036d555..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyManagement.java
+++ /dev/null
@@ -1,162 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.sql.Clob;
-import java.sql.Timestamp;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
-
-
-/**
- * The persistent class for the roles database table.
- *
- */
-@Entity
-@Table(name="policy_manangement")
-@NamedQuery(name="PolicyManagement.findAll", query="SELECT r FROM PolicyManagement r")
-public class PolicyManagement implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
-
- @Column(name="id")
- private int id;
-
- @Column(name="POLICY_NAME", nullable=false, length=45)
- private String policyName;
-
- @Column(name="scope", nullable=false, length=45)
- private String scope;
-
- @Column(name="ECOMP_NAME", nullable=false, length=45)
- private String ecompName;
-
- @Column(name="CONFIG_NAME", nullable=false, length=45)
- private String configName;
-
- @Column(name="XML", nullable=false)
- private Clob xml;
-
- @Column(name="CREATE_DATE_TIME", nullable=false)
- private Timestamp createDateTime;
-
-
- @Column(name="CREATED_BY", nullable=false, length=45)
- private String createdBy;
-
- @Column(name="UPDATE_DATE_TIME", nullable=false)
- private Timestamp updateDateTime;
-
- @Column(name="UPDATED_BY", nullable=false, length=45)
- private String updatedBy;
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getPolicyName() {
- return policyName;
- }
-
- public void setPolicyName(String policyName) {
- this.policyName = policyName;
- }
-
- public String getScope() {
- return scope;
- }
-
- public void setScope(String scope) {
- this.scope = scope;
- }
-
- public String getEcompName() {
- return ecompName;
- }
-
- public void setEcompName(String ecompName) {
- this.ecompName = ecompName;
- }
-
- public String getConfigName() {
- return configName;
- }
-
- public void setConfigName(String configName) {
- this.configName = configName;
- }
-
- public Clob getXml() {
- return xml;
- }
-
- public void setXml(Clob xml) {
- this.xml = xml;
- }
-
- public Timestamp getCreateDateTime() {
- return createDateTime;
- }
-
- public void setCreateDateTime(Timestamp createDateTime) {
- this.createDateTime = createDateTime;
- }
-
- public String getCreatedBy() {
- return createdBy;
- }
-
- public void setCreatedBy(String createdBy) {
- this.createdBy = createdBy;
- }
-
- public Timestamp getUpdateDateTime() {
- return updateDateTime;
- }
-
- public void setUpdateDateTime(Timestamp updateDateTime) {
- this.updateDateTime = updateDateTime;
- }
-
- public String getUpdatedBy() {
- return updatedBy;
- }
-
- public void setUpdatedBy(String updatedBy) {
- this.updatedBy = updatedBy;
- }
-
-
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyRoles.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyRoles.java
deleted file mode 100644
index ede5d1020..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyRoles.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.Table;
-
-import org.openecomp.policy.rest.jpa.UserInfo;
-
-
-/**
- * The persistent class for the roles database table.
- *
- */
-@Entity
-@Table(name="roles")
-@NamedQuery(name="PolicyRoles.findAll", query="SELECT r FROM PolicyRoles r ")
-public class PolicyRoles implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
-
- @Column(name="id")
- private int id;
-
- @ManyToOne
- @JoinColumn(name="loginid")
- @OrderBy("asc")
- private UserInfo loginId;
-
- public UserInfo getLoginId() {
- return loginId;
- }
-
- public void setLoginId(UserInfo loginId) {
- this.loginId = loginId;
- }
-
- @Column(name="scope", nullable=true, length=45)
- private String scope;
-
- @Column(name="role", nullable=false, length=45)
- private String role;
-
- public PolicyRoles() {
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getScope() {
- return this.scope;
- }
-
- public void setScope(String scope) {
- this.scope = scope;
-
- }
- public String getRole() {
- return this.role;
- }
-
- public void setRole(String role) {
- this.role = role;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeClosedLoop.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeClosedLoop.java
deleted file mode 100644
index 8315ed070..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeClosedLoop.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="PolicyScopeClosedLoop")
-@NamedQuery(name="PolicyScopeClosedLoop.findAll", query="SELECT e FROM PolicyScopeClosedLoop e ")
-public class PolicyScopeClosedLoop implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="description ")
- private String description ;
-
- public PolicyScopeClosedLoop() {
-
- }
- public PolicyScopeClosedLoop(String string, String userid) {
- this(domain);
-
- }
- public PolicyScopeClosedLoop(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
-
- }
- public String getDescriptionValue() {
- return this.description ;
- }
-
- public void setDescriptionValue(String description ) {
- this.description = description ;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeResource.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeResource.java
deleted file mode 100644
index 76eb40d3e..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeResource.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="PolicyScopeResource")
-@NamedQuery(name="PolicyScopeResource.findAll", query="SELECT e FROM PolicyScopeResource e ")
-public class PolicyScopeResource implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="description ")
- private String description ;
-
- public PolicyScopeResource() {
-
- }
- public PolicyScopeResource(String string, String userid) {
- this(domain);
-
- }
- public PolicyScopeResource(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
-
- }
- public String getDescriptionValue() {
- return this.description ;
- }
-
- public void setDescriptionValue(String description ) {
- this.description = description ;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeService.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeService.java
deleted file mode 100644
index 820616988..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeService.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="PolicyScopeService")
-@NamedQuery(name="PolicyScopeService.findAll", query="SELECT e FROM PolicyScopeService e ")
-public class PolicyScopeService implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="description ")
- private String description ;
-
- public PolicyScopeService() {
-
- }
- public PolicyScopeService(String string, String userid) {
- this(domain);
-
- }
- public PolicyScopeService(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
-
- }
- public String getDescriptionValue() {
- return this.description ;
- }
-
- public void setDescriptionValue(String description ) {
- this.description = description ;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeType.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeType.java
deleted file mode 100644
index 65fe6e5f7..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScopeType.java
+++ /dev/null
@@ -1,100 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="PolicyScopeType")
-@NamedQuery(name="PolicyScopeType.findAll", query="SELECT e FROM PolicyScopeType e ")
-public class PolicyScopeType implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="description ")
- private String description ;
-
- public PolicyScopeType() {
-
- }
- public PolicyScopeType(String string, String userid) {
- this(domain);
-
- }
- public PolicyScopeType(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
-
- }
- public String getDescriptionValue() {
- return this.description ;
- }
-
- public void setDescriptionValue(String description ) {
- this.description = description ;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScore.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScore.java
deleted file mode 100644
index 3cd84eb2d..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyScore.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="POLICYSCORE")
-@NamedQueries({
- @NamedQuery(name="POLICYSCORE.findAll", query="SELECT p FROM PolicyScore p"),
- @NamedQuery(name="POLICYSCORE.deleteAll", query="DELETE FROM PolicyScore WHERE 1=1"),
- @NamedQuery(name="POLICYSCORE.findByPolicyName", query="Select p from PolicyScore p where p.PolicyName=:pname")
-})
-public class PolicyScore implements Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="POLICY_NAME", nullable=false)
- @OrderBy("asc")
- private String PolicyName;
-
- @Column(name="VERSIONEXTENSION", nullable=false)
- @OrderBy("asc")
- private String VersionExtension;
-
- @Column(name="POLICY_SCORE", nullable=true)
- private String PolicyScore;
-
- public PolicyScore() {
-
- }
-
- public PolicyScore(String pName, String pScore) {
- this(domain);
-
- }
- public PolicyScore(String domain) {
-
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getPolicyName() {
- return PolicyName;
- }
- public void setPolicyName(String policyName) {
- PolicyName = policyName;
- }
- public String getVersionExtension() {
- return VersionExtension;
- }
-
- public void setVersionExtension(String versionExtension) {
- VersionExtension = versionExtension;
- }
- public String getPolicyScore() {
- return PolicyScore;
- }
- public void setPolicyScore(String policyScore) {
- PolicyScore = policyScore;
- }
-
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyVersion.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyVersion.java
deleted file mode 100644
index 4355693f3..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PolicyVersion.java
+++ /dev/null
@@ -1,183 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-//import java.sql.Clob;
-import java.sql.Timestamp;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQueries;
-import javax.persistence.NamedQuery;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-
-@Entity
-@Table(name="PolicyVersion")
-@NamedQueries({
- @NamedQuery(name="PolicyVersion.findAll", query="SELECT p FROM PolicyVersion p"),
- @NamedQuery(name="PolicyVersion.deleteAll", query="DELETE FROM PolicyVersion WHERE 1=1"),
- @NamedQuery(name="PolicyVersion.findByPolicyName", query="Select p from PolicyVersion p where p.policyName=:pname"),
- @NamedQuery(name="PolicyVersion.findAllCount", query="SELECT COUNT(p) FROM PolicyVersion p")
-})
-public class PolicyVersion implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
-
- @Column(name="id")
- private int id;
-
- @Column(name="POLICY_NAME", nullable=false, length=255)
- private String policyName;
-
- @Column(name="ACTIVE_VERSION")
- private int activeVersion;
-
- @Column(name="HIGHEST_VERSION")
- private int higherVersion;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", nullable=false)
- private Date createdDate;
-
-
- public int getActiveVersion() {
- return activeVersion;
- }
-
- public void setActiveVersion(int activeVersion) {
- this.activeVersion = activeVersion;
- }
-
- public int getHigherVersion() {
- return higherVersion;
- }
-
- public void setHigherVersion(int higherVersion) {
- this.higherVersion = higherVersion;
- }
-
- @Column(name="CREATED_BY", nullable=false, length=45)
- private String createdBy;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
-
- @Column(name="modified_by", nullable=false, length=45)
- private String modifiedBy;
-
- public PolicyVersion(String domain, String loginUserId) {
- this(domain);
- this.createdBy = loginUserId;
- this.modifiedBy = loginUserId;
- }
-
- public PolicyVersion(String domain) {
- this.policyName = domain;
- }
-
- public PolicyVersion(){
-
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- /*
- * The modifiedBy must be set via the setModifiedBy() method since PolicyVersion
- * has been moved to XACML-REST module for access from the XACML-PAP-REST module
-
- String userid = ((XacmlAdminUI) UI.getCurrent()).getLoginUserId();
- this.modifiedBy =userid;
- *
- */
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getPolicyName() {
- return policyName;
- }
-
- public void setPolicyName(String policyName) {
- this.policyName = policyName;
- }
-
- public Date getCreatedDate() {
- return createdDate;
- }
-
- public void setCreatedDate(Timestamp createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getCreatedBy() {
- return createdBy;
- }
-
- public void setCreatedBy(String createdBy) {
- this.createdBy = createdBy;
- }
-
- public Date getModifiedDate() {
- return modifiedDate;
- }
-
- public void setModifiedDate(Timestamp modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
- public String getModifiedBy() {
- return modifiedBy;
- }
-
- public void setModifiedBy(String modifiedBy) {
- this.modifiedBy = modifiedBy;
- }
-
-}
-
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PortList.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PortList.java
deleted file mode 100644
index 7bc4cf46a..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PortList.java
+++ /dev/null
@@ -1,104 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="portlist")
-@NamedQuery(name="PortList.findAll", query="SELECT e FROM PortList e ")
-public class PortList implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="portname", nullable=false)
- @OrderBy("asc")
- private String portName;
-
- @Column(name="description")
- private String description;
-/*
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;*/
-
- public PortList() {
-
- }
- public PortList(String string, String userid) {
- this(domain);
-
- }
- public PortList(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getPortName() {
- return this.portName;
- }
-
- public void setPortName(String portName) {
- this.portName = portName;
-
- }
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PrefixList.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PrefixList.java
deleted file mode 100644
index e94afd4f1..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/PrefixList.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="PrefixList")
-@NamedQuery(name="PrefixList.findAll", query="SELECT e FROM PrefixList e ")
-public class PrefixList implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="pl_name", nullable=false)
- @OrderBy("asc")
- private String prefixListName;
-
- @Column(name="description", nullable=false)
- private String description;
-
- @Column(name="pl_value", nullable=false)
- private String prefixListValue;
-/*
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;*/
-
- public PrefixList() {
-
- }
- public PrefixList(String string, String userid) {
- this(domain);
-
- }
- public PrefixList(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
- public String getPrefixListName() {
- return this.prefixListName;
- }
-
- public void setPrefixListName(String prefixListName) {
- this.prefixListName = prefixListName;
-
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
-
- }
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getPrefixListValue() {
- return this.prefixListValue;
- }
-
- public void setPrefixListValue(String prefixListValue) {
- this.prefixListValue = prefixListValue;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ProtocolList.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ProtocolList.java
deleted file mode 100644
index d7cba8ffe..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ProtocolList.java
+++ /dev/null
@@ -1,105 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="protocollist")
-@NamedQuery(name="ProtocolList.findAll", query="SELECT e FROM ProtocolList e ")
-public class ProtocolList implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="protocolname", nullable=false)
- @OrderBy("asc")
- private String protocolName;
-
- @Column(name="description")
- private String description;
-/*
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;*/
-
- public ProtocolList() {
-
- }
- public ProtocolList(String string, String userid) {
- this(domain);
-
- }
- public ProtocolList(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
- public String getProtocolName() {
- return this.protocolName;
- }
-
- public void setProtocolName(String protocolName) {
- this.protocolName = protocolName;
-
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
-
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RainyDayTreatments.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RainyDayTreatments.java
deleted file mode 100644
index 7219c7d36..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RainyDayTreatments.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.Table;
-
-import java.io.Serializable;
-
-/**
- * The persistent class for the RainyDayTreatment database table.
- *
- */
-@Entity
-@Table(name="RainyDayTreatments")
-@NamedQuery(name="RainyDayTreatments.findAll", query="SELECT e FROM RainyDayTreatments e")
-public class RainyDayTreatments implements Serializable {
- /**
- *
- */
- private static final long serialVersionUID = -2491410352490381323L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="bbid", nullable=false, length=255)
- @OrderBy("asc")
- private String bbid;
-
- @Column(name="workstep", nullable=true, length=255)
- private String workstep;
-
- @Column(name="treatments", nullable=true, length=1028)
- private String treatments;
-
- public RainyDayTreatments() {
-
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- /**
- * @return the bbid
- */
- public String getBbid() {
- return bbid;
- }
-
- /**
- * @param bbid the bbid to set
- */
- public void setBbid(String bbid) {
- this.bbid = bbid;
- }
-
- /**
- * @return the workstep
- */
- public String getWorkstep() {
- return workstep;
- }
-
- /**
- * @param workstep the workstep to set
- */
- public void setWorkstep(String workstep) {
- this.workstep = workstep;
- }
-
- /**
- * @return the treatments
- */
- public String getTreatments() {
- return treatments;
- }
-
- /**
- * @param treatments the treatments to set
- */
- public void setTreatments(String treatments) {
- this.treatments = treatments;
- }
-
-
-} \ No newline at end of file
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RemoteCatalogValues.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RemoteCatalogValues.java
deleted file mode 100644
index b2b4df75b..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RemoteCatalogValues.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="RemoteCatalogValues")
-@NamedQuery(name="RemoteCatalogValues.findAll", query="SELECT e FROM RemoteCatalogValues e ")
-public class RemoteCatalogValues implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="value")
- private String value;
-
-
- public RemoteCatalogValues() {
-
- }
- public RemoteCatalogValues(String string, String userid) {
- this(domain);
-
- }
- public RemoteCatalogValues(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
- public String getValue() {
- return value;
- }
-
- public void setValue(String value) {
- this.value = value;
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
-
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RiskType.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RiskType.java
deleted file mode 100644
index 077138e1f..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RiskType.java
+++ /dev/null
@@ -1,172 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-
-@Entity
-@Table(name="RiskType")
-@NamedQuery(name="RiskType.findAll", query="SELECT e FROM RiskType e ")
-public class RiskType implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false, unique=true)
- @OrderBy("asc")
- private String name;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- private static Log LOGGER = LogFactory.getLog(RiskType.class);
-
- public RiskType() {
-
- }
-
- public RiskType(String string, String userid) {
- this(domain);
- }
-
- public RiskType(String domain) {
- this.name = domain;
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy =XacmlAdminAuthorization.getUserId();
- } catch (Exception e) {
- LOGGER.error("Exception caused While adding Modified by Role"+e);
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "RiskType", "Exception caused While adding Modified by Role");
- }
- }
- public String getRiskName() {
- return this.name;
- }
-
- public void setRiskName(String riskName) {
- this.name = riskName;
-
- }
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RuleAlgorithms.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RuleAlgorithms.java
deleted file mode 100644
index 4ec0dff67..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/RuleAlgorithms.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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=========================================================
- */
-
-/*
- * AT&T - PROPRIETARY
- * THIS FILE CONTAINS PROPRIETARY INFORMATION OF
- * AT&T AND IS NOT TO BE DISCLOSED OR USED EXCEPT IN
- * ACCORDANCE WITH APPLICABLE AGREEMENTS.
- *
- * Copyright (c) 2014 AT&T Knowledge Ventures
- * Unpublished and Not for Publication
- * All Rights Reserved
- */
-package org.openecomp.policy.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-import com.att.research.xacml.api.Identifier;
-
-@Entity
-@Table(name="RuleAlgorithms")
-@NamedQuery(name="RuleAlgorithms.findAll", query="SELECT d FROM RuleAlgorithms d")
-public class RuleAlgorithms implements Serializable {
- private static final long serialVersionUID = 1L;
-
- public static final char STANDARD = 'S';
- public static final char CUSTOM = 'C';
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="is_standard", nullable=false)
- private char isStandard;
-
- @Column(name="xacml_id", nullable=false, unique=true, length=255)
- private String xacmlId;
-
- @Column(name="short_name", nullable=false, length=64)
- private String shortName;
-
- public RuleAlgorithms(Identifier id, char standard) {
- if (id != null) {
- this.xacmlId = id.stringValue();
- }
- this.isStandard = standard;
- }
- public RuleAlgorithms(Identifier id) {
- this(id, RuleAlgorithms.STANDARD);
- }
-
- public RuleAlgorithms() {
- this(null, RuleAlgorithms.STANDARD);
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public char getIsStandard() {
- return this.isStandard;
- }
-
- public void setIsStandard(char isStandard) {
- this.isStandard = isStandard;
- }
-
- @Transient
- public boolean isStandard() {
- return (this.isStandard == RuleAlgorithms.STANDARD);
- }
-
- @Transient
- public boolean isCustom() {
- return (this.isStandard == RuleAlgorithms.CUSTOM);
- }
-
- public String getXacmlId() {
- return this.xacmlId;
- }
-
- public void setXacmlId(String xacmlId) {
- this.xacmlId = xacmlId;
- }
-
- public String getShortName() {
- return shortName;
- }
-
- public void setShortName(String shortName) {
- this.shortName = shortName;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/SafePolicyWarning.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/SafePolicyWarning.java
deleted file mode 100644
index 8d3a0f277..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/SafePolicyWarning.java
+++ /dev/null
@@ -1,109 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="SafePolicyWarning")
-@NamedQuery(name="SafePolicyWarning.findAll", query="SELECT e FROM SafePolicyWarning e ")
-public class SafePolicyWarning implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="message")
- private String message ;
-
- @Column(name="riskType")
- private String riskType ;
-
- public String getRiskType() {
- return riskType;
- }
- public void setRiskType(String riskType) {
- this.riskType = riskType;
- }
- public SafePolicyWarning() {
-
- }
- public SafePolicyWarning(String string, String userid) {
- this(domain);
-
- }
- public SafePolicyWarning(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public String getMessage() {
- return message;
- }
- public void setMessage(String message) {
- this.message = message;
- }
- public void setName(String name) {
- this.name = name;
-
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/SecurityZone.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/SecurityZone.java
deleted file mode 100644
index 5de032f8f..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/SecurityZone.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="securityzone")
-@NamedQuery(name="SecurityZone.findAll", query="SELECT e FROM SecurityZone e ")
-public class SecurityZone implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String zoneName;
-
- @Column(name="value")
- private String zoneValue;
-
-
- public SecurityZone() {
-
- }
- public SecurityZone(String string, String userid) {
- this(domain);
-
- }
- public SecurityZone(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getZoneName() {
- return this.zoneName;
- }
-
- public void setZoneName(String zoneName) {
- this.zoneName = zoneName;
-
- }
- public String getZoneValue() {
- return this.zoneValue;
- }
-
- public void setZoneValue(String zoneValue) {
- this.zoneValue = zoneValue;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ServiceList.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ServiceList.java
deleted file mode 100644
index b3e473b1a..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/ServiceList.java
+++ /dev/null
@@ -1,154 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="servicegroup")
-@NamedQuery(name="ServiceList.findAll", query="SELECT e FROM ServiceList e ")
-public class ServiceList implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String serviceName;
-
- @Column(name="description")
- private String serviceDesc;
-
- @Column(name="type")
- private String serviceType;
-
- @Column(name="transportprotocol")
- private String serviceTrasProtocol;
-
- @Column(name="appprotocol ")
- private String serviceAppProtocol;
-
- @Column(name="ports")
- private String servicePorts;
-
-
-
-/*
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;*/
-
- public ServiceList() {
-
- }
- public ServiceList(String string, String userid) {
- this(domain);
-
- }
- public ServiceList(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getServiceName() {
- return this.serviceName;
- }
-
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
-
- }
-
- public String getServiceDescription() {
- return this.serviceDesc;
- }
-
- public void setServiceDescription(String serviceDesc) {
- this.serviceDesc = serviceDesc;
-
- }
-
- public String getServiceType() {
- return this.serviceType;
- }
-
- public void setServiceType(String serviceType) {
- this.serviceType = serviceType;
- }
-
- public String getServiceTransProtocol() {
- return this.serviceTrasProtocol;
- }
-
- public void setServiceTransProtocol(String serviceTrasProtocol) {
- this.serviceTrasProtocol = serviceTrasProtocol;
-
- }
-
- public String getServiceAppProtocol() {
- return this.serviceAppProtocol;
- }
-
- public void setServiceAppProtocol(String serviceAppProtocol) {
- this.serviceAppProtocol = serviceAppProtocol;
-
- }
- public String getServicePorts() {
- return this.servicePorts;
- }
-
- public void setServicePorts(String servicePorts) {
- this.servicePorts = servicePorts;
-
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/SystemLogDB.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/SystemLogDB.java
deleted file mode 100644
index 6fa91ee03..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/SystemLogDB.java
+++ /dev/null
@@ -1,163 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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=========================================================
- */
-
-/*
- * AT&T - PROPRIETARY
- * THIS FILE CONTAINS PROPRIETARY INFORMATION OF
- * AT&T AND IS NOT TO BE DISCLOSED OR USED EXCEPT IN
- * ACCORDANCE WITH APPLICABLE AGREEMENTS.
- *
- * Copyright (c) 2013 AT&T Knowledge Ventures
- * Unpublished and Not for Publication
- * All Rights Reserved
- */
-package org.openecomp.policy.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-/**
- * The persistent class for the system log database table.
- *
-*/
-@Entity
-@Table(name="SystemLogDB")
-@NamedQuery(name="SystemLogDB.findAll", query="SELECT o FROM SystemLogDB o")
-public class SystemLogDB implements Serializable {
- private static final long serialVersionUID = 1L;
-
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="type", nullable=false)
- private String type;
-
- @Column(name="system", nullable=false, length=255)
- private String system;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Column(name="remote", nullable=false, length=255)
- private String remote;
-
- @Column(name="logtype", nullable=false, length=255)
- private String logtype;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="date", nullable=false, updatable=false)
- private Date date;
-
- public SystemLogDB() {
- super();
- }
-
- public SystemLogDB(int id, String system, String description, String remote,
- String type, String logtype) {
- this.id = id;
- this.system = system;
- this.description = description;
- this.remote = remote;
- this.type = type;
- this.logtype = logtype;
- }
-
- public void SystemLogB (int id, String system, String description, String remote, String type, Date date, String logtype){
- this.id = id;
- this.system = system;
- this.description = description;
- this.remote = remote;
- this.type = type;
- this.date = date;
- this.logtype = logtype;
-
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public Date getDate(){
- return this.date;
- }
-
- public void setDate(Date date){
- this.date = date;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public String getType() {
- return this.type;
- }
-
- public void setType(String type) {
- this.type = type;
-
- }
-
- public String getSystem() {
- return this.system;
- }
-
- public void setSystem(String system) {
- this.system = system;
- }
-
- public String getRemote() {
- return this.remote;
- }
-
- public void setRemote(String remote) {
- this.remote = remote;
-
- }
- public String getLogtype() {
- return this.logtype;
- }
-
- public void setLogtype(String logtype) {
- this.logtype = logtype;
-
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/TermList.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/TermList.java
deleted file mode 100644
index 38bbf793a..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/TermList.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-
-
-@Entity
-@Table(name="TERM")
-@NamedQuery(name="TermList.findAll", query="SELECT e FROM TermList e")
-public class TermList implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="termName", nullable=false)
- @OrderBy("asc")
- private String termName;
-
- @Column(name="description")
- private String termDescription;
-
- @Column(name="fromzone")
- private String fromZone;
-
- @Column(name="tozone")
- private String toZone;
-
- @Column(name="srcIPList")
- private String srcIPList;
-
- @Column(name="destIPList")
- private String destIPList;
-
- @Column(name="protocolList")
- private String protocolList;
-
- @Column(name="portList")
- private String portList;
-
- @Column(name="srcPortList")
- private String srcPortList;
-
- @Column(name="destPortList")
- private String destPortList;
-
- @Column(name="action")
- private String action;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- private static Log LOGGER = LogFactory.getLog(TermList.class);
-
- public TermList() {
-
- }
-
- private static final Log auditLogger = LogFactory
- .getLog("auditLogger");
-
- public TermList(String string, String userid) {
- this(domain);
- }
- public TermList(String domain) {
- this.termName = domain;
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- auditLogger.debug("Added New Term Name: "+this.termName+" by "+this.userCreatedBy);
-
- }
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy =XacmlAdminAuthorization.getUserId();;
- } catch (Exception e) {
- LOGGER.error("Exception caused While adding Modified by Role"+e);
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "TermList", "Exception caused While adding Modified by Role");
- }
- auditLogger.debug("Updated Term Name: "+this.termName+" by "+this.userModifiedBy);
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getTermName() {
- return this.termName;
- }
-
- public void setTermName(String termName) {
- this.termName = termName;
- }
-
- public String getTermDescription() {
- return this.termDescription;
- }
-
- public void setDescription(String termDescription) {
- this.termDescription = termDescription;
- }
-
- public String getFromZone() {
- return this.fromZone;
- }
-
- public void setFromZones(String fromZone) {
- this.fromZone = fromZone;
- }
-
- public String getToZone() {
- return this.toZone;
- }
-
- public void setToZones(String toZone) {
- this.toZone = toZone;
- }
-
- public String getSrcIPList() {
- return this.srcIPList;
- }
-
- public void setSrcIPList(String srcIPList) {
- this.srcIPList = srcIPList;
- }
-
- public String getDestIPList() {
- return this.destIPList;
- }
-
- public void setDestIPList(String destIPList) {
- this.destIPList = destIPList;
- }
-
- public String getProtocolList() {
- return this.protocolList;
- }
-
- public void setProtocolList(String protocolList) {
- this.protocolList = protocolList;
- }
-
- public String getPortList() {
- return this.portList;
- }
-
- public void setPortList(String portList) {
- this.portList = portList;
- }
-
- public String getSrcPortList() {
- return this.srcPortList;
- }
-
- public void setSrcPortList(String srcPortList) {
- this.srcPortList = srcPortList;
- }
-
- public String getDestPortList() {
- return this.destPortList;
- }
-
- public void setDestPortList(String destPortList) {
- this.destPortList = destPortList;
- }
-
-
- public String getAction() {
- return this.action;
- }
-
- public void setAction(String action) {
- this.action = action;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/UserInfo.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/UserInfo.java
deleted file mode 100644
index 9dd771e6c..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/UserInfo.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.Table;
-import javax.persistence.Transient;
-
-import com.att.research.xacml.api.Identifier;
-import com.att.research.xacml.std.IdentifierImpl;
-import com.fasterxml.jackson.annotation.JsonBackReference;
-
-@Entity
-@Table(name = "UserInfo")
-@NamedQuery(name="UserInfo.findAll", query="SELECT u FROM UserInfo u ")
-public class UserInfo implements Serializable {
- private static final long serialVersionUID = 1L;
-
- @Id
- @Column(name="loginid", nullable=false, length=45)
- private String userLoginId;
-
- @Column(name = "name", nullable = false, unique = true)
- private String userName;
-
- public UserInfo(){
- this.userLoginId = userName;
-
- }
-
- public String getUserLoginId() {
- return userLoginId;
- }
-
- public void setUserLoginId(String loginid) {
- this.userLoginId = loginid;
- }
-
- public String getUserName() {
- return userName;
- }
-
- public void setUserName(String userName) {
- this.userName = userName;
- }
-
- @Transient
- @JsonBackReference
- public Identifier getIdentiferByUserId() {
- return new IdentifierImpl(this.userName);
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VMType.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VMType.java
deleted file mode 100644
index e7ae197fc..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VMType.java
+++ /dev/null
@@ -1,102 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-
-@Entity
-@Table(name="VMType")
-@NamedQuery(name="VMType.findAll", query="SELECT e FROM VMType e ")
-public class VMType implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="name", nullable=false)
- @OrderBy("asc")
- private String name;
-
- @Column(name="description")
- private String description;
-
-
- public VMType() {
-
- }
- public VMType(String string, String userid) {
- this(domain);
-
- }
- public VMType(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
- public String getDescription() {
- return description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getName() {
- return this.name;
- }
-
- public void setName(String name) {
- this.name = name;
-
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VNFType.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VNFType.java
deleted file mode 100644
index 693e27553..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VNFType.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-
-
-
-@Entity
-@Table(name="VNFType")
-@NamedQuery(name="VNFType.findAll", query="SELECT v FROM VNFType v ")
-public class VNFType implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="vnf_type", nullable=false, unique=true)
- @OrderBy("asc")
- private String vnftype;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- private static Log LOGGER = LogFactory.getLog(VNFType.class);
-
- public VNFType() {
-
- }
-
- public String getVnftype() {
- return vnftype;
- }
-
- public void setVnftype(String vnftype) {
- this.vnftype = vnftype;
- }
-
- public VNFType(String string, String userid) {
- this(domain);
- }
-
- public VNFType(String domain) {
- this.vnftype = domain;
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy =XacmlAdminAuthorization.getUserId();;
- } catch (Exception e) {
- LOGGER.error("Exception caused While adding Modified by Role"+e);
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "VNFType", "Exception caused While adding Modified by Role");
- }
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VSCLAction.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VSCLAction.java
deleted file mode 100644
index 7f42650a3..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VSCLAction.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-
-
-@Entity
-@Table(name="VSCLAction")
-@NamedQuery(name="VSCLAction.findAll", query="SELECT v FROM VSCLAction v ")
-public class VSCLAction implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="vscl_action", nullable=false, unique=true)
- @OrderBy("asc")
- private String vsclaction;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Column(name="description", nullable=true, length=2048)
- private String description;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- private static Log LOGGER = LogFactory.getLog(VSCLAction.class);
-
- public VSCLAction() {
-
- }
-
- public VSCLAction(String string, String userid) {
- this(domain);
- }
-
- public VSCLAction(String domain) {
- this.vsclaction = domain;
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy =XacmlAdminAuthorization.getUserId();;
- } catch (Exception e) {
- LOGGER.error("Exception caused While adding Modified by Role"+e);
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "VSCLAction", "Exception caused While adding Modified by Role");
- }
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getVsclaction() {
- return vsclaction;
- }
-
- public void setVsclaction(String vsclaction) {
- this.vsclaction = vsclaction;
- }
-
-
- public Date getCreatedDate() {
- return this.createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public String getDescription() {
- return this.description;
- }
-
- public void setDescription(String description) {
- this.description = description;
- }
-
- public Date getModifiedDate() {
- return this.modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VarbindDictionary.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VarbindDictionary.java
deleted file mode 100644
index 1bb56a067..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/VarbindDictionary.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-
-import java.io.Serializable;
-import java.util.Date;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-import javax.persistence.Temporal;
-import javax.persistence.TemporalType;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.openecomp.policy.rest.XacmlAdminAuthorization;
-
-import org.openecomp.policy.common.logging.eelf.MessageCodes;
-import org.openecomp.policy.common.logging.eelf.PolicyLogger;
-
-@Entity
-@Table(name="VarbindDictionary")
-@NamedQuery(name = "VarbindDictionary.findAll", query = "Select v FROM VarbindDictionary v")
-public class VarbindDictionary implements Serializable{
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name = "Id")
- private int id;
-
- @Column(name ="varbind_Name", nullable = false, unique = true)
- @OrderBy("asc")
- private String varbindName;
-
- @Column(name = "varbind_Description", nullable = true, length = 2048)
- private String varbindDescription;
-
- @Column(name = "varbind_oid", nullable = false)
- private String varbindOID;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="created_date", updatable=false)
- private Date createdDate;
-
- @Temporal(TemporalType.TIMESTAMP)
- @Column(name="modified_date", nullable=false)
- private Date modifiedDate;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="created_by")
- private UserInfo userCreatedBy;
-
- @ManyToOne(optional = false)
- @JoinColumn(name="modified_by")
- private UserInfo userModifiedBy;
-
- public UserInfo getUserCreatedBy() {
- return userCreatedBy;
- }
-
- public void setUserCreatedBy(UserInfo userCreatedBy) {
- this.userCreatedBy = userCreatedBy;
- }
-
- public UserInfo getUserModifiedBy() {
- return userModifiedBy;
- }
-
- public void setUserModifiedBy(UserInfo userModifiedBy) {
- this.userModifiedBy = userModifiedBy;
- }
-
- private static Log LOGGER = LogFactory.getLog(VarbindDictionary.class);
-
- public VarbindDictionary() {
-
- }
-
- public VarbindDictionary(String string, String userid) {
- this(domain);
- }
-
- public VarbindDictionary(String domain) {
- this.varbindName = domain;
- }
-
- @PrePersist
- public void prePersist() {
- Date date = new Date();
- this.createdDate = date;
- this.modifiedDate = date;
- }
-
- @PreUpdate
- public void preUpdate() {
- this.modifiedDate = new Date();
- try {
- this.userModifiedBy =XacmlAdminAuthorization.getUserId();;
- } catch (Exception e) {
- LOGGER.error("Exception caused While adding Modified by Role"+e);
- PolicyLogger.error(MessageCodes.EXCEPTION_ERROR, e, "VarbindDictionary", "Exception caused While adding Modified by Role");
- }
- }
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getVarbindName() {
- return varbindName;
- }
-
- public void setVarbindName(String varbindName) {
- this.varbindName = varbindName;
- }
-
- public String getVarbindDescription() {
- return varbindDescription;
- }
-
- public void setVarbindDescription(String varbindDescription) {
- this.varbindDescription = varbindDescription;
- }
-
- public String getVarbindOID() {
- return varbindOID;
- }
-
- public void setVarbindOID(String varbindOID) {
- this.varbindOID = varbindOID;
- }
-
- public Date getCreatedDate() {
- return createdDate;
- }
-
- public void setCreatedDate(Date createdDate) {
- this.createdDate = createdDate;
- }
-
- public Date getModifiedDate() {
- return modifiedDate;
- }
-
- public void setModifiedDate(Date modifiedDate) {
- this.modifiedDate = modifiedDate;
- }
-
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/WatchPolicyNotificationTable.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/WatchPolicyNotificationTable.java
deleted file mode 100644
index 2acc82cce..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/WatchPolicyNotificationTable.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- *
- *
- * */
-
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.Table;
-
-@Entity
-@Table(name = "WatchPolicyNotificationTable")
-@NamedQuery(name="WatchPolicyNotificationTable.findAll", query="SELECT e FROM WatchPolicyNotificationTable e ")
-public class WatchPolicyNotificationTable implements Serializable{
- private static final long serialVersionUID = 1L;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="policyName", nullable=false, unique=true)
- @OrderBy("asc")
- private String policyName;
-
- @Column(name="loginIds", nullable=false, unique=true)
- @OrderBy("asc")
- private String loginIds;
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getPolicyName() {
- return policyName;
- }
-
- public void setPolicyName(String policyName) {
- this.policyName = policyName;
- }
-
- public String getLoginIds() {
- return loginIds;
- }
-
- public void setLoginIds(String loginIds) {
- this.loginIds = loginIds;
- }
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Zone.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Zone.java
deleted file mode 100644
index 30e02e06d..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/Zone.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;
-/*
- */
-import java.io.Serializable;
-
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedQuery;
-import javax.persistence.OrderBy;
-import javax.persistence.PrePersist;
-import javax.persistence.PreUpdate;
-import javax.persistence.Table;
-
-@Entity
-@Table(name="zone")
-@NamedQuery(name="Zone.findAll", query="SELECT e FROM Zone e ")
-public class Zone implements Serializable {
- private static final long serialVersionUID = 1L;
-
- private static String domain;
-
- @Id
- @GeneratedValue(strategy = GenerationType.AUTO)
- @Column(name="id")
- private int id;
-
- @Column(name="zonename", nullable=false)
- @OrderBy("asc")
- private String zoneName;
-
- @Column(name="zonevalue")
- private String zoneValue;
-
-
- public Zone() {
-
- }
- public Zone(String string, String userid) {
- this(domain);
-
- }
- public Zone(String domain) {
-
- }
-
- @PrePersist
- public void prePersist() {
-
- }
- @PreUpdate
- public void preUpdate() {
- }
-
-
- public int getId() {
- return this.id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
- public String getZoneName() {
- return this.zoneName;
- }
-
- public void setZoneName(String zoneName) {
- this.zoneName = zoneName;
-
- }
- public String getZoneValue() {
- return this.zoneValue;
- }
-
- public void setZoneValue(String zoneValue) {
- this.zoneValue = zoneValue;
- }
-
-}
diff --git a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/package-info.java b/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/package-info.java
deleted file mode 100644
index 4e77ba9e7..000000000
--- a/ECOMP-REST/src/main/java/org/openecomp/policy/rest/jpa/package-info.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ECOMP-REST
- * ================================================================================
- * 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.rest.jpa;