Class TrunkServiceImpl

    • Constructor Detail

      • TrunkServiceImpl

        public TrunkServiceImpl()
    • Method Detail

      • list

        public List<? extends Trunk> list()
        Lists all trunks
        Specified by:
        list in interface TrunkService
        Returns:
        a list of trunks
      • create

        public Trunk create​(Trunk trunk)
        Creates a trunk
        Specified by:
        create in interface TrunkService
        Parameters:
        trunk - the trunk to create
        Returns:
        the created trunk object
      • get

        public Trunk get​(String trunkId)
        Get a trunk by ID
        Specified by:
        get in interface TrunkService
        Parameters:
        trunkId - the trunk ID
        Returns:
        the trunk object
      • update

        public Trunk update​(Trunk trunk)
        Updates a trunk object
        Specified by:
        update in interface TrunkService
        Parameters:
        trunk - the trunk object to update
        Returns:
        the updated trunk object
      • addTrunkSubport

        public Trunk addTrunkSubport​(String trunkId,
                                     TrunkSubport subPort)
        Adds a subport to the specified Trunk
        Specified by:
        addTrunkSubport in interface TrunkService
        Parameters:
        trunkId - ID of the trunk
        subPort - subport object to add
        Returns:
        the updated trunk object
      • removeTrunkSubport

        public Trunk removeTrunkSubport​(String trunkId,
                                        String portId)
        Removes subport from the specified trunk
        Specified by:
        removeTrunkSubport in interface TrunkService
        Parameters:
        trunkId - trunk ID
        portId - the ID of the subport to remove
        Returns:
        trunk object with the subport removed