Class PhysicalConnectionRestController

  • All Implemented Interfaces:
    PhysicalConnectionRestOpenApi

    @RestController
    @RequestMapping("/v2.1.1/physical-connections/")
    public class PhysicalConnectionRestController
    extends Object
    implements PhysicalConnectionRestOpenApi
    Physical Connection Rest Controller.
    Author:
    Mauricio Ruiz Beltrán <mauricio.ruiz@kuwaiba.org>
    • Constructor Detail

      • PhysicalConnectionRestController

        public PhysicalConnectionRestController()
    • Method Detail

      • createPhysicalConnection

        @RequestMapping(method=POST,
                        value="createPhysicalConnection/{aObjectClassName}/{aObjectId}/{bObjectClassName}/{bObjectId}/{name}/{connectionClassName}/{templateId}/{userName}/{sessionId}",
                        produces="application/json")
        public String createPhysicalConnection​(@PathVariable("aObjectClassName")
                                               String aObjectClassName,
                                               @PathVariable("aObjectId")
                                               String aObjectId,
                                               @PathVariable("bObjectClassName")
                                               String bObjectClassName,
                                               @PathVariable("bObjectId")
                                               String bObjectId,
                                               @PathVariable("name")
                                               String name,
                                               @PathVariable("connectionClassName")
                                               String connectionClassName,
                                               @PathVariable("templateId")
                                               String templateId,
                                               @PathVariable("userName")
                                               String userName,
                                               @PathVariable("sessionId")
                                               String sessionId)
        Creates a physical connection.
        Specified by:
        createPhysicalConnection in interface PhysicalConnectionRestOpenApi
        Parameters:
        aObjectClassName - The class name of the first object to related.
        aObjectId - The id of the first object to related.
        bObjectClassName - The class name of the second object to related.
        bObjectId - The id of the first object to related.
        name - The connection name.
        connectionClassName - 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.
        sessionId - The session token id.
        Returns:
        The id of the newly created physical connection.
      • deletePhysicalConnection

        @RequestMapping(method=DELETE,
                        value="deletePhysicalConnection/{objectClassName}/{objectId}/{userName}/{sessionId}",
                        produces="application/json")
        public void deletePhysicalConnection​(@PathVariable("objectClassName")
                                             String objectClassName,
                                             @PathVariable("objectId")
                                             String objectId,
                                             @PathVariable("userName")
                                             String userName,
                                             @PathVariable("sessionId")
                                             String sessionId)
        Deletes a physical connection.
        Specified by:
        deletePhysicalConnection in interface PhysicalConnectionRestOpenApi
        Parameters:
        objectClassName - The class name of the object.
        objectId - The id of the object.
        userName - The user name of the session.
        sessionId - The session token id.
      • getPhysicalPath

        @RequestMapping(method=GET,
                        value="getPhysicalPath/{objectClassName}/{objectId}/{sessionId}",
                        produces="application/json")
        public List<BusinessObjectLight> getPhysicalPath​(@PathVariable("objectClassName")
                                                         String objectClassName,
                                                         @PathVariable("objectId")
                                                         String objectId,
                                                         @PathVariable("sessionId")
                                                         String sessionId)
        Finds the physical path from one port to another.
        Specified by:
        getPhysicalPath in interface PhysicalConnectionRestOpenApi
        Parameters:
        objectClassName - The source port class name.
        objectId - The source port id.
        sessionId - The session token id.
        Returns:
        A list of objects that make part of the physical trace.
      • getPhysicalTree

        @RequestMapping(method=GET,
                        value="getPhysicalTree/{objectClassName}/{objectId}/{sessionId}",
                        produces="application/json")
        public HashMap<BusinessObjectLight,​List<BusinessObjectLight>> getPhysicalTree​(@PathVariable("objectClassName")
                                                                                            String objectClassName,
                                                                                            @PathVariable("objectId")
                                                                                            String objectId,
                                                                                            @PathVariable("sessionId")
                                                                                            String sessionId)
        Gets A tree representation of all physical paths as a hash map.
        Specified by:
        getPhysicalTree in interface PhysicalConnectionRestOpenApi
        Parameters:
        objectClassName - The source port class name.
        objectId - The source port id.
        sessionId - The session token id.
        Returns:
        A tree representation of all physical paths as a hash map.