FileDocCategorySizeDatePackage
SunTargetModuleID.javaAPI DocGlassfish v2 API6580Fri May 04 22:34:28 BST 2007com.sun.enterprise.deployapi

SunTargetModuleID

public class SunTargetModuleID extends SunTarget implements Serializable, javax.enterprise.deploy.spi.TargetModuleID
author
Jerome Dochez

Fields Summary
private String
moduleID
private javax.enterprise.deploy.shared.ModuleType
moduleType
private boolean
initialized
private SunTargetModuleID
parent
private Vector
children
private String
webUrl
Constructors Summary
public SunTargetModuleID(String moduleID, SunTarget target)
Creates a new instance of SunTargetModuleID

    
           
         
        super(target);
        this.moduleID = moduleID;
    
Methods Summary
public voidaddChildTargetModuleID(com.sun.enterprise.deployapi.SunTargetModuleID child)
Add a child TargetModuleID to this TargetModuleID

        if (children==null) {
            children = new Vector();
        }
        child.setParentTargetModuleID(this);
        children.add(child);
    
public java.lang.StringdebugString()

return
a meaningful string for myself

        String s = "TargetModuleID type " + getModuleType() +  " moduleID " + toString() + " on target = " + super.toString(); 
        if (ModuleType.WAR.equals(moduleType)) {
            s = s + " at " + getWebURL();
        } 
        return s;
    
public booleanequals(java.lang.Object other)

return
true if I am the equals to the other object

        if (other instanceof SunTargetModuleID) {
            SunTargetModuleID theOther = (SunTargetModuleID) other;
            return (moduleID.equals(theOther.moduleID) && super.equals(theOther));
        }
        return false;
    
public javax.enterprise.deploy.spi.TargetModuleID[]getChildTargetModuleID()
Retrieve a list of identifiers of the children of this deployed module.

return
a list of TargetModuleIDs identifying the childern of this object. A null value means this module has no childern

        if (children==null)
            return null;
        
        TargetModuleID[] list = new TargetModuleID[children.size()];
        children.copyInto(list);
        return list;
    
public java.lang.StringgetModuleID()
Retrieve the id assigned to represent the deployed module.

        return moduleID;
    
public javax.enterprise.deploy.shared.ModuleTypegetModuleType()

return
the module type of this deployed module

        return moduleType;
    
public javax.enterprise.deploy.spi.TargetModuleIDgetParentTargetModuleID()
Retrieve the identifier of the parent object of this deployed module. If there is no parent then this is the root object deployed. The root could represent an EAR file or it could be a stand alone module that was deployed.

return
the TargetModuleID of the parent of this object. A null value means this module is the root object deployed.

        return parent;
    
public javax.enterprise.deploy.spi.TargetgetTarget()
Retrieve the name of the target server. this module was deployed to.

return
Target an object representing a server target.

        return this;
    
public java.lang.StringgetWebURL()
If this TargetModulID represents a web module retrieve the URL for it.

return
the URL of a web module or null if the module is not a web module.

        return webUrl;
    
public inthashCode()

return
hashCode based on values used in equals

        int result = 17;
        result = 37 * result + ((moduleID == null) ? 0 : moduleID.hashCode());
        return result;
    
public voidsetModuleType(javax.enterprise.deploy.shared.ModuleType moduleType)
Sets the module type for this deployed module

param
the module type

        this.moduleType = moduleType;
    
public voidsetParentTargetModuleID(com.sun.enterprise.deployapi.SunTargetModuleID parent)
Sets the parent TargetModuleID

        this.parent = parent;
    
public voidsetWebURL(java.lang.String webUrl)
set the URL of a web module if the module is a web module.

        this.webUrl = webUrl;
    
public java.lang.StringtoString()

return
a meaningful string for myself

        return moduleID + "_" + super.toString();