1 23 24 package com.sun.enterprise.appclient.jws; 25 26 import com.sun.enterprise.admin.common.exception.IllegalStateException; 27 import com.sun.enterprise.deployment.Application; 28 import com.sun.enterprise.deployment.util.ModuleDescriptor; 29 30 35 public class NestedAppclientContentOrigin extends AppclientContentOrigin { 36 37 38 private ApplicationContentOrigin parent; 39 40 41 private String name; 42 43 49 public NestedAppclientContentOrigin(ApplicationContentOrigin parent, ModuleDescriptor moduleDescr, String contextRoot) { 50 super(parent.getApplication(), moduleDescr, contextRoot); 51 this.parent = parent; 52 this.name = NamingConventions.NestedAppclient.archiveURIToName(moduleDescr.getArchiveUri()); 53 } 54 55 59 public boolean isEnabled() { 60 return parent.isEnabled(); 61 } 62 63 73 public String getTopLevelRegistrationName() { 74 return parent.getApplication().getRegistrationName(); 75 } 76 77 81 public ApplicationContentOrigin getParent() { 82 return parent; 83 } 84 85 91 public String getAppclientJarPath() { 92 throw new RuntimeException ("Unexpected invocation"); 93 } 94 95 public String toString() { 96 return super.toString() + lineSep + ", parent=" + getTopLevelRegistrationName(); 97 } 98 99 103 public String getContentKeyPrefix() { 104 return NamingConventions.NestedAppclient.contentKeyPrefix(this); 105 } 106 107 public String getVirtualPath() { 108 return NamingConventions.NestedAppclient.virtualContextRoot(parent.application, moduleDescriptor); 109 } 110 111 115 public String getName() { 116 return name; 117 } 118 119 protected String getTargetPath() { 120 return NamingConventions.NestedAppclient.actualContextRoot(this); 121 } 122 } 123 | Popular Tags |