1 23 24 package com.sun.enterprise.appclient.jws; 25 26 import com.sun.enterprise.deployment.Application; 27 import com.sun.enterprise.deployment.util.ModuleDescriptor; 28 import java.io.IOException ; 29 import java.net.URI ; 30 import java.util.Iterator ; 31 import java.util.Vector ; 32 33 39 public class ApplicationContentOrigin extends UserContentOrigin { 40 41 42 private Vector <AppclientContentOrigin> appclientOrigins; 43 44 49 public ApplicationContentOrigin(Application application) { 50 super(application); 51 appclientOrigins = new Vector <AppclientContentOrigin>(); 52 } 53 54 59 public void addNestedOrigin(AppclientContentOrigin origin) { 60 appclientOrigins.add(origin); 61 } 62 63 68 public boolean removeNestedOrigin(AppclientContentOrigin origin) { 69 return appclientOrigins.remove(origin); 70 } 71 72 76 public Vector <AppclientContentOrigin> getAppclientOrigins() { 77 return appclientOrigins; 78 } 79 80 86 public String getContentKeyPrefix() { 87 return NamingConventions.TopLevelApplication.contentKeyPrefix(this); 88 } 89 94 public String getAppclientJarPath() { 95 return NamingConventions.TopLevelApplication.appclientJarPath(this); 96 } 97 98 public String toString() { 99 StringBuilder sb = new StringBuilder (super.toString()); 100 for (AppclientContentOrigin child : appclientOrigins) { 101 sb.append(lineSep).append(" ").append(child.toString()); 102 } 103 return sb.toString(); 104 } 105 106 111 public String getContextRoot() { 112 return NamingConventions.TopLevelApplication.contextRoot(application); 113 } 114 115 120 public boolean isEnabled() { 121 try { 122 return AppclientJWSSupportInfo.getInstance().isEnabled(this); 123 } catch (IOException ioe) { 124 128 return false; 129 } catch (Exception e) { 130 throw new RuntimeException (e); 131 } 132 } 133 } 134 | Popular Tags |