Package org.glassfish.deployapi
Class TargetModuleIDImpl
- java.lang.Object
-
- org.glassfish.deployapi.TargetModuleIDImpl
-
- All Implemented Interfaces:
javax.enterprise.deploy.spi.TargetModuleID
public class TargetModuleIDImpl extends Object implements javax.enterprise.deploy.spi.TargetModuleID
Implements theTargetModuleIDinterface from JSR-88, representing the presence of a given module on a givenTarget.This implementation is independent of the
TargetOwnerthat owns the corresponding Target.- Author:
- tjquinn
-
-
Constructor Summary
Constructors Constructor Description TargetModuleIDImpl(TargetImpl target, String moduleID)Creates a new implementation object of TargetModuleId with no parent and no children.TargetModuleIDImpl(TargetImpl target, String moduleID, TargetModuleIDImpl parent, TargetModuleIDImpl[] children)Creates a new implementation object of TargetModuleID.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddChildTargetModuleID(TargetModuleIDImpl child)Add a child TargetModuleID to this TargetModuleIDjavax.enterprise.deploy.spi.TargetModuleID[]getChildTargetModuleID()Returns the TargetModuleIDs representing submodules of this module deployed to the Target.StringgetModuleID()Returns the name of the module that is deployed to a given Target.javax.enterprise.deploy.shared.ModuleTypegetModuleType()javax.enterprise.deploy.spi.TargetModuleIDgetParentTargetModuleID()Returns the TargetModuleID for the containing module on the Target, if this TargetModuleID represents a submodule.javax.enterprise.deploy.spi.TargetgetTarget()Returns the Target on which the module is deployed.TargetImplgetTargetImpl()Returns the Target on which the module is deployed.StringgetWebURL()Returns the URL for running the Web module, if this TargetModuleID represents a Web module or submodule on a Target.voidsetModuleType(javax.enterprise.deploy.shared.ModuleType moduleType)Sets the module type for this deployed modulevoidsetParentTargetModuleID(TargetModuleIDImpl parent)Sets the parent TargetModuleIDvoidsetWebURL(String webURL)Sets the URL for running the Web module, if this TargetModuleID represents a Web module or submodule on a Target.StringtoString()ReturnsgetModuleID().
-
-
-
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 residesmoduleID- the name of the moduleparent- 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 residesmoduleID- 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:
getTargetin interfacejavax.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:
getModuleIDin interfacejavax.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:
getWebURLin interfacejavax.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:
getParentTargetModuleIDin interfacejavax.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:
getChildTargetModuleIDin interfacejavax.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()
ReturnsgetModuleID().
-
-