From 91d04c64771832a0b8815ffbe1f0f9920320d94d Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Tue, 14 Feb 2017 19:41:00 -0500 Subject: Initial OpenECOMP policy/engine commit Change-Id: I7dbff37733b661643dd4d1caefa3d7dccc361b6e Signed-off-by: Pamela Dragosh --- .../policy/dao/FunctionDefinitionDao.java | 32 ++++++++++++++++++ .../policy/dao/GlobalRoleSettingsDao.java | 33 ++++++++++++++++++ .../org/openecomp/policy/dao/GroupEntityDao.java | 39 ++++++++++++++++++++++ .../org/openecomp/policy/dao/PDPEntityDao.java | 33 ++++++++++++++++++ .../policy/dao/PolicyEditorScopesDao.java | 37 ++++++++++++++++++++ .../org/openecomp/policy/dao/PolicyRolesDao.java | 37 ++++++++++++++++++++ .../org/openecomp/policy/dao/PolicyVersionDao.java | 38 +++++++++++++++++++++ .../policy/dao/RemoteCatalogValuesDao.java | 34 +++++++++++++++++++ .../java/org/openecomp/policy/dao/RolesDao.java | 38 +++++++++++++++++++++ .../openecomp/policy/dao/RuleAlgorithmsDao.java | 31 +++++++++++++++++ .../org/openecomp/policy/dao/SystemLogDbDao.java | 33 ++++++++++++++++++ .../policy/dao/WatchPolicyNotificationDao.java | 35 +++++++++++++++++++ 12 files changed, 420 insertions(+) create mode 100644 ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/FunctionDefinitionDao.java create mode 100644 ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/GlobalRoleSettingsDao.java create mode 100644 ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/GroupEntityDao.java create mode 100644 ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PDPEntityDao.java create mode 100644 ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PolicyEditorScopesDao.java create mode 100644 ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PolicyRolesDao.java create mode 100644 ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PolicyVersionDao.java create mode 100644 ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/RemoteCatalogValuesDao.java create mode 100644 ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/RolesDao.java create mode 100644 ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/RuleAlgorithmsDao.java create mode 100644 ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/SystemLogDbDao.java create mode 100644 ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/WatchPolicyNotificationDao.java (limited to 'ecomp-sdk-app/src/main/java/org/openecomp/policy/dao') diff --git a/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/FunctionDefinitionDao.java b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/FunctionDefinitionDao.java new file mode 100644 index 000000000..c216ca589 --- /dev/null +++ b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/FunctionDefinitionDao.java @@ -0,0 +1,32 @@ +/*- + * ============LICENSE_START======================================================= + * ECOMP Policy Engine + * ================================================================================ + * 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.dao; + + +import java.util.List; + +import org.openecomp.policy.rest.jpa.FunctionDefinition; + +public interface FunctionDefinitionDao { + + List getFunctionDefinition(); + List getFunctionDefinitionByName(); +} diff --git a/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/GlobalRoleSettingsDao.java b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/GlobalRoleSettingsDao.java new file mode 100644 index 000000000..35aab5211 --- /dev/null +++ b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/GlobalRoleSettingsDao.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * ECOMP Policy Engine + * ================================================================================ + * 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.dao; + + +import java.util.List; + +import org.openecomp.policy.rest.jpa.GlobalRoleSettings; + +public interface GlobalRoleSettingsDao { + + void update(GlobalRoleSettings globalRoleSettings); + List getGlobalRoleSettings(); + +} diff --git a/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/GroupEntityDao.java b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/GroupEntityDao.java new file mode 100644 index 000000000..8983382f7 --- /dev/null +++ b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/GroupEntityDao.java @@ -0,0 +1,39 @@ +/*- + * ============LICENSE_START======================================================= + * ECOMP Policy Engine + * ================================================================================ + * 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.dao; + + +import java.util.List; + +import org.openecomp.policy.rest.jpa.GroupEntity; + + +public abstract interface GroupEntityDao { + + public abstract List getGroupEntityData(); + + public abstract GroupEntity getPDPGroupEntity(String string); + + public abstract void savePDPGroupEntity(GroupEntity pdpGroupDataFunction); + + public abstract void deletePDPGroupEntity(GroupEntity pdpGroupDataFunction); + +} diff --git a/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PDPEntityDao.java b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PDPEntityDao.java new file mode 100644 index 000000000..60f7441b3 --- /dev/null +++ b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PDPEntityDao.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * ECOMP Policy Engine + * ================================================================================ + * 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.dao; + + +import java.util.List; + +import org.openecomp.policy.rest.jpa.PdpEntity; + + +public abstract interface PDPEntityDao { + + public abstract List getPDPEntityData(); + +} diff --git a/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PolicyEditorScopesDao.java b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PolicyEditorScopesDao.java new file mode 100644 index 000000000..f40de6d50 --- /dev/null +++ b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PolicyEditorScopesDao.java @@ -0,0 +1,37 @@ +/*- + * ============LICENSE_START======================================================= + * ECOMP Policy Engine + * ================================================================================ + * 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.dao; + + +import java.util.List; + +import org.openecomp.policy.rest.jpa.PolicyEditorScopes; + + +public interface PolicyEditorScopesDao { + List getPolicyEditorScopesData(); + List getPolicyEditorScopesDataByName(); + void Save(PolicyEditorScopes policyEditorScopes); + void delete(PolicyEditorScopes policyEditorScopes); + void update(PolicyEditorScopes policyEditorScopes); + List getListOfPolicyScopes(String query); + void updateQuery(String policyScopeQuery); +} diff --git a/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PolicyRolesDao.java b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PolicyRolesDao.java new file mode 100644 index 000000000..49cd17c10 --- /dev/null +++ b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PolicyRolesDao.java @@ -0,0 +1,37 @@ +/*- + * ============LICENSE_START======================================================= + * ECOMP Policy Engine + * ================================================================================ + * 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.dao; + + +import java.util.List; + +import org.openecomp.policy.rest.jpa.PolicyRoles; + +public interface PolicyRolesDao { + + List getRoles(); + List getUserRoles(); + void save(PolicyRoles role); + + void update(PolicyRoles role); + + void delete(PolicyRoles role); +} diff --git a/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PolicyVersionDao.java b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PolicyVersionDao.java new file mode 100644 index 000000000..0c2692e6c --- /dev/null +++ b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/PolicyVersionDao.java @@ -0,0 +1,38 @@ +/*- + * ============LICENSE_START======================================================= + * ECOMP Policy Engine + * ================================================================================ + * 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.dao; + + +import java.util.List; + +import org.openecomp.policy.rest.jpa.PolicyVersion; + + +public interface PolicyVersionDao { + List getPolicyVersionData(); + List getPolicyVersionEntityByName(String policyVersion); + List getPolicyVersionDataByName(); + List getActiveVersionPolicy(String query); + void Save(PolicyVersion policyVersion); + void delete(PolicyVersion policyVersion); + void update(PolicyVersion policyVersion); + void updateQuery(String policyVersion); +} diff --git a/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/RemoteCatalogValuesDao.java b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/RemoteCatalogValuesDao.java new file mode 100644 index 000000000..c2ff0f7b8 --- /dev/null +++ b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/RemoteCatalogValuesDao.java @@ -0,0 +1,34 @@ +/*- + * ============LICENSE_START======================================================= + * ECOMP Policy Engine + * ================================================================================ + * 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.dao; + + +import java.util.List; + +import org.openecomp.policy.rest.jpa.RemoteCatalogValues; + +public interface RemoteCatalogValuesDao { + List getRemoteCatalogValuesData(); + List getRemoteCatalogValuesDataByName(); + void Save(RemoteCatalogValues attribute); + void delete(RemoteCatalogValues attribute); + void update(RemoteCatalogValues attribute); +} diff --git a/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/RolesDao.java b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/RolesDao.java new file mode 100644 index 000000000..4612daea0 --- /dev/null +++ b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/RolesDao.java @@ -0,0 +1,38 @@ +/*- + * ============LICENSE_START======================================================= + * ECOMP Policy Engine + * ================================================================================ + * 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.dao; + + +import java.util.List; + +import org.openecomp.policy.model.Roles; + + + +public interface RolesDao { + + List getUserRoles(String userId); + + void save(Roles role); + + void delete(Roles role); + +} diff --git a/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/RuleAlgorithmsDao.java b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/RuleAlgorithmsDao.java new file mode 100644 index 000000000..6a9c6b303 --- /dev/null +++ b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/RuleAlgorithmsDao.java @@ -0,0 +1,31 @@ +/*- + * ============LICENSE_START======================================================= + * ECOMP Policy Engine + * ================================================================================ + * 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.dao; + + +import java.util.List; + +import org.openecomp.policy.rest.jpa.RuleAlgorithms; + +public interface RuleAlgorithmsDao { + + List getRuleAlgorithms(); +} diff --git a/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/SystemLogDbDao.java b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/SystemLogDbDao.java new file mode 100644 index 000000000..bdfdd8f0a --- /dev/null +++ b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/SystemLogDbDao.java @@ -0,0 +1,33 @@ +/*- + * ============LICENSE_START======================================================= + * ECOMP Policy Engine + * ================================================================================ + * 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.dao; + + +import java.util.List; + +import org.openecomp.policy.rest.jpa.SystemLogDB; + + + +public abstract interface SystemLogDbDao { + public abstract List getLoggingData(); + public abstract List getSystemAlertData(); +} diff --git a/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/WatchPolicyNotificationDao.java b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/WatchPolicyNotificationDao.java new file mode 100644 index 000000000..a43294e94 --- /dev/null +++ b/ecomp-sdk-app/src/main/java/org/openecomp/policy/dao/WatchPolicyNotificationDao.java @@ -0,0 +1,35 @@ +/*- + * ============LICENSE_START======================================================= + * ECOMP Policy Engine + * ================================================================================ + * 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.dao; + + +import java.util.List; + +import org.openecomp.policy.rest.jpa.WatchPolicyNotificationTable; + +public interface WatchPolicyNotificationDao { + List getListData(); + List getListDataByPolicyName(String policyName); + void save(WatchPolicyNotificationTable data); + void update(WatchPolicyNotificationTable data); + void delete(WatchPolicyNotificationTable data); + List watchListQuery(String query); +} -- cgit 1.2.3-korg