Class PhysicalConnectionsService
- java.lang.Object
-
- org.neotropic.kuwaiba.modules.optional.physcon.PhysicalConnectionsService
-
@Service public class PhysicalConnectionsService extends Object
Service to manage the physical connections- Author:
- Johny Andres Ortega Ruiz <johny.ortega@kuwaiba.org>
-
-
Field Summary
Fields Modifier and Type Field Description static String
RELATIONSHIP_ENDPOINTA
A side in a physical connection.static String
RELATIONSHIP_ENDPOINTB
B side in a physical connection.
-
Constructor Summary
Constructors Constructor Description PhysicalConnectionsService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
createPhysicalConnection(String aObjectClass, String aObjectId, String bObjectClass, String bObjectId, String name, String connectionClass, String templateId, String userName)
Creates a physical connection.void
deletePhysicalConnection(String objectClassName, String objectId, String userName)
Deletes a physical connection.List<BusinessObjectLight>
getPhysicalPath(String objectClass, String objectId)
Finds the physical path from one port to another.HashMap<BusinessObjectLight,List<BusinessObjectLight>>
getPhysicalTree(String objectClass, String objectId)
Gets A tree representation of all physical paths as a hash map.
-
-
-
Method Detail
-
createPhysicalConnection
public String createPhysicalConnection(String aObjectClass, String aObjectId, String bObjectClass, String bObjectId, String name, String connectionClass, String templateId, String userName) throws IllegalStateException, OperationNotPermittedException
Creates a physical connection.- Parameters:
aObjectClass
- The class name of the first object to related.aObjectId
- The id of the first object to related.bObjectClass
- The class name of the second object to related.bObjectId
- The id of the first object to related.name
- The connection name.connectionClass
- The class name of the connection. Must be subclass of GenericPhysicalConnection.templateId
- Template id to be used to create the current object. Use null as string or empty string to not use a template.userName
- The user name of the session.- Returns:
- The id of the newly created physical connection.
- Throws:
IllegalStateException
OperationNotPermittedException
-
deletePhysicalConnection
public void deletePhysicalConnection(String objectClassName, String objectId, String userName) throws IllegalStateException, InventoryException
Deletes a physical connection.- Parameters:
objectClassName
- The class name of the object.objectId
- The id of the objectuserName
- The user name of the session.- Throws:
IllegalStateException
InventoryException
-
getPhysicalPath
public List<BusinessObjectLight> getPhysicalPath(String objectClass, String objectId) throws IllegalStateException, MetadataObjectNotFoundException, BusinessObjectNotFoundException, ApplicationObjectNotFoundException, InvalidArgumentException
Finds the physical path from one port to another.- Parameters:
objectClass
- The source port class.objectId
- The source port id.- Returns:
- A list of objects that make part of the physical trace.
- Throws:
MetadataObjectNotFoundException
BusinessObjectNotFoundException
ApplicationObjectNotFoundException
InvalidArgumentException
IllegalStateException
-
getPhysicalTree
public HashMap<BusinessObjectLight,List<BusinessObjectLight>> getPhysicalTree(String objectClass, String objectId) throws IllegalStateException, BusinessObjectNotFoundException, MetadataObjectNotFoundException, ApplicationObjectNotFoundException, InvalidArgumentException
Gets A tree representation of all physical paths as a hash map.- Parameters:
objectClass
- The source port class name.objectId
- The source port id.- Returns:
- A tree representation of all physical paths as a hash map.
- Throws:
BusinessObjectNotFoundException
- If any of the objects involved in the path cannot be foundMetadataObjectNotFoundException
- If any of the object classes involved in the path cannot be foundApplicationObjectNotFoundException
- If any of the objects involved in the path has a malformed list type attributeInvalidArgumentException
- If any of the objects involved in the path has an invalid objectId or classNameIllegalStateException
-
-