Class TargetModuleIDImpl

  • All Implemented Interfaces:
    javax.enterprise.deploy.spi.TargetModuleID

    public class TargetModuleIDImpl
    extends Object
    implements javax.enterprise.deploy.spi.TargetModuleID
    Implements the TargetModuleID interface from JSR-88, representing the presence of a given module on a given Target.

    This implementation is independent of the TargetOwner that owns the corresponding Target.

    Author:
    tjquinn
    • Constructor Detail

      • TargetModuleIDImpl

        public TargetModuleIDImpl​(TargetImpl target,
                                  String moduleID,
                                  TargetModuleIDImpl parent,
                                  TargetModuleIDImpl[] children)
        Creates a new implementation object of TargetModuleID.

        Normally this constructor should be used only by implementations of TargetOwner. Other code will normally retrieve TargetModuleID objects from other methods that create them as part of their work (such as deployment, for example).

        Parameters:
        target - the target on which the module resides
        moduleID - the name of the module
        parent - the higher-level TargetModuleIDImpl (if this object represents a submodule of a module that is deployed to a Target)
        children - TargetModuleIDImpl objects representing the submodules of this module as deployed to the Target
      • TargetModuleIDImpl

        public TargetModuleIDImpl​(TargetImpl target,
                                  String moduleID)
        Creates a new implementation object of TargetModuleId with no parent and no children.
        Parameters:
        target - the target on which the module resides
        moduleID - the name of the module
    • Method Detail

      • getTarget

        public javax.enterprise.deploy.spi.Target getTarget()
        Returns the Target on which the module is deployed.
        Specified by:
        getTarget in interface javax.enterprise.deploy.spi.TargetModuleID
        Returns:
        the TargetImpl
      • getTargetImpl

        public TargetImpl getTargetImpl()
        Returns the Target on which the module is deployed.
        Returns:
        the TargetImpl
      • getModuleID

        public String getModuleID()
        Returns the name of the module that is deployed to a given Target.
        Specified by:
        getModuleID in interface javax.enterprise.deploy.spi.TargetModuleID
        Returns:
        the module name
      • getWebURL

        public String getWebURL()
        Returns the URL for running the Web module, if this TargetModuleID represents a Web module or submodule on a Target.
        Specified by:
        getWebURL in interface javax.enterprise.deploy.spi.TargetModuleID
        Returns:
        the URL
      • setWebURL

        public void setWebURL​(String webURL)
        Sets the URL for running the Web module, if this TargetModuleID represents a Web module or submodule on a Target.
        Parameters:
        webURL -
      • getParentTargetModuleID

        public javax.enterprise.deploy.spi.TargetModuleID getParentTargetModuleID()
        Returns the TargetModuleID for the containing module on the Target, if this TargetModuleID represents a submodule.
        Specified by:
        getParentTargetModuleID in interface javax.enterprise.deploy.spi.TargetModuleID
        Returns:
        the parent TargetModuleID
      • getChildTargetModuleID

        public javax.enterprise.deploy.spi.TargetModuleID[] getChildTargetModuleID()
        Returns the TargetModuleIDs representing submodules of this module deployed to the Target.
        Specified by:
        getChildTargetModuleID in interface javax.enterprise.deploy.spi.TargetModuleID
        Returns:
        the child TargetModuleID objects
      • addChildTargetModuleID

        public void addChildTargetModuleID​(TargetModuleIDImpl child)
        Add a child TargetModuleID to this TargetModuleID
      • setParentTargetModuleID

        public void setParentTargetModuleID​(TargetModuleIDImpl parent)
        Sets the parent TargetModuleID
      • setModuleType

        public void setModuleType​(javax.enterprise.deploy.shared.ModuleType moduleType)
        Sets the module type for this deployed module
        Parameters:
        moduleType - ModuleType
      • getModuleType

        public javax.enterprise.deploy.shared.ModuleType getModuleType()
        Returns:
        the module type of this deployed module
      • toString

        public String toString()
        Returns getModuleID().
        Specified by:
        toString in interface javax.enterprise.deploy.spi.TargetModuleID
        Overrides:
        toString in class Object