1 19 20 package org.netbeans.modules.j2ee.oc4j; 21 22 import java.util.Vector ; 23 import javax.enterprise.deploy.spi.Target ; 24 import javax.enterprise.deploy.spi.TargetModuleID ; 25 26 30 class OC4JTargetModuleID implements TargetModuleID { 31 private Target target; 32 private String jar_name; 33 private String context_url; 34 private Vector childs = new Vector (); 35 private TargetModuleID parent = null; 36 37 OC4JTargetModuleID(Target target) { 38 this( target, ""); 39 } 40 41 OC4JTargetModuleID(Target target, String jar_name) { 42 this.target = target; 43 this.setJARName(jar_name); 44 } 45 46 public void setContextURL( String context_url) { 47 this.context_url = context_url; 48 } 49 50 public void setJARName( String jar_name) { 51 this.jar_name = jar_name; 52 } 53 54 public void setParent( OC4JTargetModuleID parent) { 55 this.parent = parent; 56 57 } 58 59 public void addChild( OC4JTargetModuleID child) { 60 childs.add( child ); 61 child.setParent( this ); 62 } 63 64 public TargetModuleID [] getChildTargetModuleID() { 65 return (TargetModuleID [])childs.toArray(new TargetModuleID [childs.size()]); 66 } 67 68 public String getModuleID(){ 70 return jar_name; 71 } 72 73 public TargetModuleID getParentTargetModuleID() { 75 return parent; 76 } 77 78 public Target getTarget(){ 80 return target; 81 } 82 public java.lang.String getWebURL() { 84 return context_url; } 86 87 public java.lang.String toString() { 89 return getModuleID() + hashCode(); 90 } 91 } | Popular Tags |