Code refactoring and added new checks
1. Divided code into subclasses
2. Before deleting the interface now method checks if:
--interface exists
--if yes, then change admin state to out of service
--if change of state successful then delete
3. Before creating interface now the method checks if:
--if interface with same name in service exists then donot create
new
--if exists but state not in service then create new
--if does not exist then create new interface with state in service
4. Before deleting a cross connect check if it exists, if not
then do not proceed.
5. Created new class CrossConnect.java with methods:
--getCrossConnect()
--postCrossConnect()
--deleteCrossConnect()
--setPowerLevel()
--getConnectionPortTrail()
6. Created new class OpenRoadmInerface.java with methods/attributes
common to all interface irrespective to their type:
--getIntfBuilder()
--postInterface()
--getInterface()
--deleteInterface()
7. Added child classes OpenRoadmOdu4Interface.java,
OpenRoadmOchInterface.java,OpenRoadmOtu4Interface.java
8. Added check for nodeType mandatory field.
9. Added checks for null value in data change notification
when a device is disconnected.
Change-Id: Id775e36a8db0d14a11147e23414df4b07d1d6910
Signed-off-by: Dhruv Bhardwaj <db929a@att.com>