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 theTargetModuleID
interface from JSR-88, representing the presence of a given module on a givenTarget
.This implementation is independent of the
TargetOwner
that 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 void
addChildTargetModuleID(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.String
getModuleID()
Returns the name of the module that is deployed to a given Target.javax.enterprise.deploy.shared.ModuleType
getModuleType()
javax.enterprise.deploy.spi.TargetModuleID
getParentTargetModuleID()
Returns the TargetModuleID for the containing module on the Target, if this TargetModuleID represents a submodule.javax.enterprise.deploy.spi.Target
getTarget()
Returns the Target on which the module is deployed.TargetImpl
getTargetImpl()
Returns the Target on which the module is deployed.String
getWebURL()
Returns the URL for running the Web module, if this TargetModuleID represents a Web module or submodule on a Target.void
setModuleType(javax.enterprise.deploy.shared.ModuleType moduleType)
Sets the module type for this deployed modulevoid
setParentTargetModuleID(TargetModuleIDImpl parent)
Sets the parent TargetModuleIDvoid
setWebURL(String webURL)
Sets the URL for running the Web module, if this TargetModuleID represents a Web module or submodule on a Target.String
toString()
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:
getTarget
in 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:
getModuleID
in 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:
getWebURL
in 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:
getParentTargetModuleID
in 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:
getChildTargetModuleID
in 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()
.
-
-