1 22 package org.jboss.deployers.plugins.structure; 23 24 import java.io.Serializable ; 25 import java.util.ArrayList ; 26 import java.util.List ; 27 28 import org.jboss.deployers.spi.structure.vfs.ClassPathInfo; 29 import org.jboss.deployers.spi.structure.vfs.ContextInfo; 30 31 37 public class ContextInfoImpl 38 implements ContextInfo, Serializable 39 { 40 private static final long serialVersionUID = 1; 41 42 private String vfsPath; 43 private String metaDataPath; 44 private ContextInfo parent; 45 private ArrayList <ClassPathInfo> classpath = new ArrayList <ClassPathInfo>(); 46 47 public ContextInfoImpl() 48 { 49 this(null); 50 } 51 public ContextInfoImpl(String vfsPath) 52 { 53 setVfsPath(vfsPath); 54 } 55 public ContextInfoImpl(String vfsPath, ContextInfo parent) 56 { 57 setVfsPath(vfsPath); 58 setParent(parent); 59 } 60 61 public ContextInfo getParent() 62 { 63 return parent; 64 } 65 public void setParent(ContextInfo parent) 66 { 67 this.parent = parent; 68 } 69 70 public String getVfsPath() 71 { 72 return vfsPath; 73 } 74 public void setVfsPath(String path) 75 { 76 this.vfsPath = path; 77 } 78 79 public String getMetaDataPath() 80 { 81 return metaDataPath; 82 } 83 public void setMetaDataPath(String metaDataPath) 84 { 85 this.metaDataPath = metaDataPath; 86 } 87 88 public List <ClassPathInfo> getClassPath() 89 { 90 return classpath; 91 } 92 public void setClassPath(List <ClassPathInfo> classpath) 93 { 94 this.classpath.clear(); 95 this.classpath.addAll(classpath); 96 } 97 public void addClassPathInfo(ClassPathInfo info) 98 { 99 classpath.add(info); 100 } 101 102 public String toString() 103 { 104 StringBuilder tmp = new StringBuilder (super.toString()); 105 tmp.append('('); 106 tmp.append(this.getVfsPath()); 107 tmp.append(')'); 108 return tmp.toString(); 109 } 110 } 111 | Popular Tags |