org.glassfish.deployapi
Class TargetModuleIDImpl

java.lang.Object
  extended by org.glassfish.deployapi.TargetModuleIDImpl
All Implemented Interfaces:
TargetModuleID

public class TargetModuleIDImpl
extends Object
implements 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 Summary
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
 void addChildTargetModuleID(TargetModuleIDImpl child)
          Add a child TargetModuleID to this TargetModuleID
 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.
 ModuleType getModuleType()
           
 TargetModuleID getParentTargetModuleID()
          Returns the TargetModuleID for the containing module on the Target, if this TargetModuleID represents a submodule.
 Target getTarget()
          Returns the Target on which the module is deployed.
 TargetImpl getTargetImpl()
           
 String getWebURL()
          Returns the URL for running the Web module, if this TargetModuleID represents a Web module or submodule on a Target.
 void setModuleType(ModuleType moduleType)
          Sets the module type for this deployed module
 void setParentTargetModuleID(TargetModuleIDImpl parent)
          Sets the parent TargetModuleID
 void setWebURL(String webURL)
          Sets the URL for running the Web module, if this TargetModuleID represents a Web module or submodule on a Target.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.enterprise.deploy.spi.TargetModuleID
toString
 

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 Target getTarget()
Returns the Target on which the module is deployed.

Specified by:
getTarget in interface TargetModuleID
Returns:
the Target

getTargetImpl

public TargetImpl getTargetImpl()

getModuleID

public String getModuleID()
Returns the name of the module that is deployed to a given Target.

Specified by:
getModuleID in interface 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 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:
the - webURL

getParentTargetModuleID

public TargetModuleID getParentTargetModuleID()
Returns the TargetModuleID for the containing module on the Target, if this TargetModuleID represents a submodule.

Specified by:
getParentTargetModuleID in interface TargetModuleID
Returns:
the parent TargetModuleID

getChildTargetModuleID

public TargetModuleID[] getChildTargetModuleID()
Returns the TargetModuleIDs representing submodules of this module deployed to the Target.

Specified by:
getChildTargetModuleID in interface 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(ModuleType moduleType)
Sets the module type for this deployed module

Parameters:
the - module type

getModuleType

public ModuleType getModuleType()
Returns:
the module type of this deployed module


Copyright © 2012. All Rights Reserved.