fixes to accomodate docker creation in ONF - added onap-enabler parent POM, renamed osam-core to osam-core-framework and removed junit that requires connection to DB

Change-Id: Ifdc95438c8b1e5856860882824a11eecac80e19a
Signed-off-by: Aharoni, Pavel (pa0916) <pavel.aharoni@intl.att.com>
diff --git a/osam-core-framework/api/pom.xml b/osam-core-framework/api/pom.xml
new file mode 100644
index 0000000..0221e6c
--- /dev/null
+++ b/osam-core-framework/api/pom.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--/*-

+        * ============LICENSE_START=======================================================

+        * OSAM Core

+        * ================================================================================

+        * Copyright (C) 2018 Netsia

+        * ================================================================================

+        * 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=========================================================

+        */-->

+<project xmlns="http://maven.apache.org/POM/4.0.0"

+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

+    <parent>

+        <artifactId>osam-core-framework</artifactId>

+        <groupId>org.onap.osam</groupId>

+        <version>0.0.2</version>

+    </parent>

+    <modelVersion>4.0.0</modelVersion>

+    <artifactId>api</artifactId>

+

+    <dependencies>

+        <dependency>

+            <groupId>org.onap.osam</groupId>

+            <artifactId>model</artifactId>

+            <version>${project.version}</version>

+        </dependency>

+        <dependency>

+            <groupId>org.onap.osam</groupId>

+            <artifactId>common</artifactId>

+            <version>${project.version}</version>

+        </dependency>

+    </dependencies>

+

+</project>
\ No newline at end of file
diff --git a/osam-core-framework/api/src/main/java/org/onap/osam/api/service/AbstractStorageService.java b/osam-core-framework/api/src/main/java/org/onap/osam/api/service/AbstractStorageService.java
new file mode 100644
index 0000000..c7c7375
--- /dev/null
+++ b/osam-core-framework/api/src/main/java/org/onap/osam/api/service/AbstractStorageService.java
@@ -0,0 +1,36 @@
+/*-

+ * ============LICENSE_START=======================================================

+ * OSAM Core

+ * ================================================================================

+ * Copyright (C) 2018 Netsia

+ * ================================================================================

+ * 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.onap.osam.api.service;

+

+import java.util.List;

+

+public interface AbstractStorageService <K,V>{

+

+    V addOrUpdate(V value);

+

+    void removeById(K key);

+

+    V getById(K key);

+

+    List<V> getAll();

+}

diff --git a/osam-core-framework/api/src/main/java/org/onap/osam/api/service/AccessPodService.java b/osam-core-framework/api/src/main/java/org/onap/osam/api/service/AccessPodService.java
new file mode 100644
index 0000000..da0a9b9
--- /dev/null
+++ b/osam-core-framework/api/src/main/java/org/onap/osam/api/service/AccessPodService.java
@@ -0,0 +1,33 @@
+/*-

+ * ============LICENSE_START=======================================================

+ * OSAM Core

+ * ================================================================================

+ * Copyright (C) 2018 Netsia

+ * ================================================================================

+ * 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.onap.osam.api.service;

+

+import org.onap.osam.model.dao.AccessPod;

+

+/**

+ * Created by cemturker on 26.09.2018.

+ */

+public interface AccessPodService extends AbstractStorageService<Long, AccessPod>{

+    AccessPod findByPnfId(String pnfId);

+    void removeByPnfId(String pnfId);

+}

diff --git a/osam-core-framework/api/src/main/java/org/onap/osam/api/service/AlarmService.java b/osam-core-framework/api/src/main/java/org/onap/osam/api/service/AlarmService.java
new file mode 100644
index 0000000..5fd8468
--- /dev/null
+++ b/osam-core-framework/api/src/main/java/org/onap/osam/api/service/AlarmService.java
@@ -0,0 +1,43 @@
+/*-

+ * ============LICENSE_START=======================================================

+ * OSAM Core

+ * ================================================================================

+ * Copyright (C) 2018 Netsia

+ * ================================================================================

+ * 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.onap.osam.api.service;

+

+import org.onap.osam.model.dao.AlarmsAndEvents;

+import org.onap.osam.model.dao.ActiveAlarmsAndEvents;

+import org.onap.osam.model.dao.HistoricalAlarmsAndEvents;

+

+import java.util.Date;

+import java.util.List;

+

+/**

+ *  basic methods belongs to Active Alarms

+ */

+public interface AlarmService{

+

+    List<ActiveAlarmsAndEvents> getActiveAlarmsAndEventsByDate(Date startDate, Date endDate);

+

+    List<HistoricalAlarmsAndEvents> getHistoricalAlarmsAndEventsByDate(Date startDate, Date endDate);

+

+    void addOrUpdate(AlarmsAndEvents alarmsAndEvents);

+

+}

diff --git a/osam-core-framework/api/src/main/java/org/onap/osam/api/service/BroadBandService.java b/osam-core-framework/api/src/main/java/org/onap/osam/api/service/BroadBandService.java
new file mode 100644
index 0000000..7ccaea8
--- /dev/null
+++ b/osam-core-framework/api/src/main/java/org/onap/osam/api/service/BroadBandService.java
@@ -0,0 +1,111 @@
+/*-

+ * ============LICENSE_START=======================================================

+ * OSAM Core

+ * ================================================================================

+ * Copyright (C) 2018 Netsia

+ * ================================================================================

+ * 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.onap.osam.api.service;

+

+import org.onap.osam.model.dao.Service;

+import org.onap.osam.model.dao.SpeedProfile;

+import org.onap.osam.model.dao.TechnologyProfile;

+

+import java.util.List;

+

+/**

+ * Created by cemturker on 18.09.2018.

+ */

+public interface BroadBandService {

+    /**

+     *

+     * @param speedProfile

+     */

+    SpeedProfile addSpeedProfile(SpeedProfile speedProfile);

+

+    /**

+     *

+     * @param technologyProfile

+     */

+    TechnologyProfile addTechnologyProfile(TechnologyProfile technologyProfile);

+

+    /**

+     *

+     * @param service

+     */

+    Service addService(Service service);

+

+    /**

+     *

+     * @param id

+     */

+    void removeSpeedProfile(Long id);

+

+    /**

+     *

+     * @param id

+     */

+    void removeTechnologyProfile(Long id);

+

+    /**

+     *

+     * @param id

+     */

+    void removeService(Long id);

+

+    /**

+     *

+     * @param id

+     * @return

+     */

+    SpeedProfile getSpeedProfile(Long id);

+

+    /**

+     *

+     * @param id

+     * @return

+     */

+    TechnologyProfile getTechnologyProfile(Long id);

+

+    /**

+     *

+     * @param id

+     * @return

+     */

+    Service getService(Long id);

+

+    /**

+     *

+     * @return

+     */

+    List<SpeedProfile> getSpeedProfiles();

+

+    /**

+     *

+     * @return

+     */

+    List<TechnologyProfile> getTechnologyProfiles();

+

+    /**

+     *

+     * @return

+     */

+    List<Service> getServices();

+

+}

+

diff --git a/osam-core-framework/api/src/main/java/org/onap/osam/api/service/DeviceService.java b/osam-core-framework/api/src/main/java/org/onap/osam/api/service/DeviceService.java
new file mode 100644
index 0000000..921bf66
--- /dev/null
+++ b/osam-core-framework/api/src/main/java/org/onap/osam/api/service/DeviceService.java
@@ -0,0 +1,187 @@
+/*-

+ * ============LICENSE_START=======================================================

+ * OSAM Core

+ * ================================================================================

+ * Copyright (C) 2018 Netsia

+ * ================================================================================

+ * 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.onap.osam.api.service;

+

+import org.onap.osam.model.dao.Chassis;

+import org.onap.osam.model.dao.OLTPort;

+import org.onap.osam.model.dao.OLTSlot;

+import org.onap.osam.model.dao.ONTDevice;

+

+import java.util.List;

+

+/**

+ * Created by Zafer Kaban on 18.09.2018.

+ */

+public interface DeviceService {

+

+     enum OntProvisioningType {

+        PREPROVISION,

+        FULL,

+        PROVISION

+    }

+

+

+/*

+Chassis Related Functionality

+---------------------------------------------------------------------------------------

+*/

+

+    /**

+     *

+     * @param chassis

+     */

+    Chassis addChassis(Chassis chassis);

+

+    /**

+     *

+     * @param id

+     */

+    void deleteChassis(Long id);

+

+    /**

+     *

+     * @param clli

+     */

+    public void deleteChassisByClli(String clli);

+

+    /**

+     *

+     * @param id

+     * @return Chassis

+     */

+    Chassis getChassisById(Long id);

+

+    /**

+     *

+     * @param clli

+     * @return Chassis

+     */

+    Chassis getChassisByClli(String clli);

+

+    /**

+     *

+     * @return Long

+     */

+    Long getChassisCount();

+

+    List<Chassis> getByPnfId(String pnfId);

+

+    List<Chassis> getAllChassis();

+

+/*

+oltSlot Related Functionality

+---------------------------------------------------------------------------------------

+*/

+

+    /**

+     *

+     *

+     * @param oltSlot

+     * @param chassis

+     */

+    OLTSlot addOLTSlot(OLTSlot oltSlot, Chassis chassis);

+

+    /**

+     *

+     * @param id

+     */

+    void deleteOLTSlot(Long id);

+

+    /**

+     *

+     * @param id

+     * @return oltSlot

+     */

+    OLTSlot getOLTSlotById(Long id);

+

+    /**

+     *

+     * @param serialNumber

+     * @return oltSlot

+     */

+    OLTSlot getOLTSlotBySerialNumber(String serialNumber);

+

+

+    /**

+     *

+     * @return all OLT slots

+     */

+    List<OLTSlot> getAllOLTSlots();

+

+/*

+OLTPort Related Functionality

+---------------------------------------------------------------------------------------

+*/

+

+    /**

+     *

+     * @param id

+     */

+    void deleteOLTPort(Long id);

+

+    /**

+     *

+     * @param id

+     * @return OLTPort

+     */

+    OLTPort getOLTPortById(Long id);

+

+/*

+ONTDevice Related Functionality

+---------------------------------------------------------------------------------------

+*/

+

+    /**

+     *

+     * @param ontDevice

+     * @param provisioningType

+     */

+    ONTDevice provisionONTDevice(ONTDevice ontDevice, OntProvisioningType provisioningType);

+

+    /**

+     *

+     * @param id

+     */

+    void deleteONTDevice(Long id);

+

+    /**

+     *

+     * @param id

+     * @return ONTDevice

+     */

+    ONTDevice getONTDeviceById(Long id);

+

+    /**

+     *

+     * @param serialNumber

+     * @return ONTDevice

+     */

+    ONTDevice getONTDeviceBySerialNumber(String serialNumber);

+

+    /**

+     *

+     * @return all ONT devices

+     */

+    List<ONTDevice> getAllONTDevices();

+

+}

diff --git a/osam-core-framework/api/src/main/java/org/onap/osam/api/service/PmConfigsService.java b/osam-core-framework/api/src/main/java/org/onap/osam/api/service/PmConfigsService.java
new file mode 100644
index 0000000..40c7dde
--- /dev/null
+++ b/osam-core-framework/api/src/main/java/org/onap/osam/api/service/PmConfigsService.java
@@ -0,0 +1,45 @@
+/*-

+ * ============LICENSE_START=======================================================

+ * OSAM Core

+ * ================================================================================

+ * Copyright (C) 2018 Netsia

+ * ================================================================================

+ * 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.onap.osam.api.service;

+

+import org.onap.osam.model.dao.PmConfigs;

+import org.onap.osam.model.dao.PmGroupConfig;

+import org.onap.osam.model.dao.PmConfig;

+

+import java.util.List;

+

+public interface PmConfigsService extends AbstractStorageService<Long,PmConfigs>{

+

+    List<PmConfig> getPmConfigByPmConfigsId(Long pmConfigsId);

+

+    List<PmConfig> getPmConfigByPmConfigGroupId(Long pmGroupConfigsId);

+

+    void addPmGroupConfig(PmConfig pmConfig);

+

+    void addPmGroupConfig(PmGroupConfig pmGroupConfig);

+

+    void removePmConfig(Long pmConfigId);

+

+    void removeGroupPmConfig(Long pmGroupConfigId);

+

+}

diff --git a/osam-core-framework/api/src/main/java/org/onap/osam/api/service/SubscriberService.java b/osam-core-framework/api/src/main/java/org/onap/osam/api/service/SubscriberService.java
new file mode 100644
index 0000000..f71be56
--- /dev/null
+++ b/osam-core-framework/api/src/main/java/org/onap/osam/api/service/SubscriberService.java
@@ -0,0 +1,32 @@
+/*-

+ * ============LICENSE_START=======================================================

+ * OSAM Core

+ * ================================================================================

+ * Copyright (C) 2018 Netsia

+ * ================================================================================

+ * 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.onap.osam.api.service;

+

+import org.onap.osam.model.dao.Subscriber;

+

+/**

+ * Created by cemturker on 18.09.2018.

+ */

+public interface SubscriberService extends AbstractStorageService<Long,Subscriber> {

+    Subscriber getBySubscriberIdentifier(String userIdentifier);

+}