Methods Summary |
---|
public void | addAppListenerDescriptor(com.sun.enterprise.deployment.web.AppListenerDescriptor ref)
if (!this.getAppListeners().contains(ref)) {
this.getAppListeners().addElement(ref);
this.changed();
}
|
public void | addAppListenerDescriptor(AppListenerDescriptorImpl ref)
addAppListenerDescriptor((AppListenerDescriptor) ref);
|
public void | addContextParameter(com.sun.enterprise.deployment.web.ContextParameter contextParameter)Adds a new context parameter to my list.
this.getContextParametersSet().add(contextParameter);
this.changed();
|
public void | addContextParameter(EnvironmentProperty contextParameter)Adds a new context parameter to my list.
addContextParameter((ContextParameter) contextParameter);
|
public void | addEjbReferenceDescriptor(com.sun.enterprise.deployment.types.EjbReference ejbReference)Adds a new reference to an ejb.
this.getEjbReferenceDescriptors().add(ejbReference);
ejbReference.setReferringBundleDescriptor(this);
this.changed();
|
public void | addEjbReferenceDescriptor(EjbReferenceDescriptor ejbReferenceDescriptor)Adds a new reference to an ejb.
this.addEjbReferenceDescriptor((EjbReference) ejbReferenceDescriptor);
|
public void | addEntityManagerFactoryReferenceDescriptor(EntityManagerFactoryReferenceDescriptor reference)
reference.setReferringBundleDescriptor(this);
this.getEntityManagerFactoryReferenceDescriptors().add(reference);
this.changed();
|
public void | addEntityManagerReferenceDescriptor(EntityManagerReferenceDescriptor reference)
reference.setReferringBundleDescriptor(this);
this.getEntityManagerReferenceDescriptors().add(reference);
this.changed();
|
public void | addEnvironmentEntry(com.sun.enterprise.deployment.web.EnvironmentEntry environmentEntry)Adds this given environment property to my list.
this.getEnvironmentEntrySet().add(environmentEntry);
this.changed();
|
public void | addEnvironmentProperty(EnvironmentProperty environmentProperty)Adds this given environment property to my list.
this.getEnvironmentEntrySet().add(environmentProperty);
this.changed();
|
public void | addErrorPageDescriptor(com.sun.enterprise.deployment.web.ErrorPageDescriptor errorPageDescriptor)Adds a new error page to my list.
this.getErrorPageDescriptorsSet().add(errorPageDescriptor);
this.changed();
|
public void | addErrorPageDescriptor(ErrorPageDescriptorImpl errorPageDescriptor)
addErrorPageDescriptor((ErrorPageDescriptor) errorPageDescriptor);
|
public void | addJmsDestinationReferenceDescriptor(JmsDestinationReferenceDescriptor jmsDestReference)
this.getJmsDestinationReferenceDescriptors().add(jmsDestReference);
this.changed();
|
public void | addLocaleEncodingMappingListDescriptor(LocaleEncodingMappingListDescriptor lemDesc)
localeEncodingMappingDesc = lemDesc;
|
public void | addMessageDestinationReferenceDescriptor(MessageDestinationReferenceDescriptor messageDestRef)
messageDestRef.setReferringBundleDescriptor(this);
this.getMessageDestinationReferenceDescriptors().add(messageDestRef);
this.changed();
|
public void | addMimeMapping(com.sun.enterprise.deployment.web.MimeMapping mimeMapping)Adds the given mime mapping to my list.
// always override
// Since Set.add API doesn't replace
// remove the element first if it's already contained
for (Iterator itr = getMimeMappingsSet().iterator(); itr.hasNext();) {
MimeMapping mm = (MimeMapping) itr.next();
if (mm.getExtension().equals(mimeMapping.getExtension())) {
getMimeMappingsSet().remove(mm);
break;
}
}
this.getMimeMappingsSet().add(mimeMapping);
this.changed();
|
public void | addMimeMapping(MimeMappingDescriptor mimeMapping)Adds the given mime mapping to my list.
addMimeMapping((MimeMapping) mimeMapping);
|
public void | addPostConstructDescriptor(LifecycleCallbackDescriptor postConstructDesc)
String className = postConstructDesc.getLifecycleCallbackClass();
boolean found = false;
for (LifecycleCallbackDescriptor next :
getPostConstructDescriptors()) {
if (next.getLifecycleCallbackClass().equals(className)) {
found = true;
break;
}
}
if (!found) {
getPostConstructDescriptors().add(postConstructDesc);
}
|
public void | addPreDestroyDescriptor(LifecycleCallbackDescriptor preDestroyDesc)
String className = preDestroyDesc.getLifecycleCallbackClass();
boolean found = false;
for (LifecycleCallbackDescriptor next :
getPreDestroyDescriptors()) {
if (next.getLifecycleCallbackClass().equals(className)) {
found = true;
break;
}
}
if (!found) {
getPreDestroyDescriptors().add(preDestroyDesc);
}
|
public void | addResourceReference(com.sun.enterprise.deployment.web.ResourceReference resourceReference)adds a new reference to a resource.
this.getResourceReferenceDescriptors().add(resourceReference);
this.changed();
|
public void | addResourceReferenceDescriptor(ResourceReferenceDescriptor resourceReference)adds a new reference to a resource.
this.addResourceReference((ResourceReference) resourceReference);
|
public void | addSecurityConstraint(com.sun.enterprise.deployment.web.SecurityConstraint securityConstraint)Add a new security constraint.
this.getSecurityConstraintsSet().add(securityConstraint);
this.changed();
|
public void | addSecurityConstraint(SecurityConstraintImpl securityConstraint)Add a new security constraint.
addSecurityConstraint((SecurityConstraint )securityConstraint);
|
public void | addSecurityRole(com.sun.enterprise.deployment.web.SecurityRole securityRole)Add a new abstrct role to me.
Role r = new Role(securityRole.getName());
r.setDescription(securityRole.getDescription());
super.addRole(r);
|
public void | addSecurityRole(SecurityRoleDescriptor securityRole)Add a new abstrct role to me.
addSecurityRole((SecurityRole) securityRole);
|
public void | addServiceReferenceDescriptor(ServiceReferenceDescriptor serviceRef)
serviceRef.setBundleDescriptor(this);
this.getServiceReferenceDescriptors().add(serviceRef);
this.changed();
|
public void | addServletFilter(com.sun.enterprise.deployment.web.ServletFilter ref)Adds a servlet filter to this web component.
if (!this.getServletFilters().contains(ref)) {
this.getServletFilters().addElement(ref);
this.changed();
}
|
public void | addServletFilter(ServletFilterDescriptor ref)
addServletFilter((ServletFilter) ref);
|
public void | addServletFilterMapping(com.sun.enterprise.deployment.web.ServletFilterMapping ref)Adds a servlet filter mapping to this web component.
if (!this.getServletFilterMappings().contains(ref)) {
this.getServletFilterMappings().addElement(ref);
this.changed();
}
|
public void | addServletFilterMapping(ServletFilterMappingDescriptor ref)Adds a servlet filter mapping to this web component.
addServletFilterMapping((ServletFilterMapping) ref);
|
public void | addWebBundleDescriptor(com.sun.enterprise.deployment.WebBundleDescriptor webBundleDescriptor)
super.addBundleDescriptor(webBundleDescriptor);
// mdf - #4400074 ejb added to existing ejb-jar in wizard has wrong bundle
// (this problem occured for WebComponents as well)
//this.getWebComponentDescriptorsSet().addAll(webBundleDescriptor.getWebComponentDescriptorsSet());
for (Iterator itr = webBundleDescriptor.getWebComponentDescriptorsSet().iterator(); itr.hasNext();) {
WebComponentDescriptor webComponentDescriptor =
new WebComponentDescriptor((WebComponentDescriptor)itr.next());
webComponentDescriptor.setWebBundleDescriptor(this);
this.getWebComponentDescriptorsSet().add(webComponentDescriptor);
}
this.getMimeMappingsSet().addAll(webBundleDescriptor.getMimeMappingsSet());
this.getWelcomeFilesSet().addAll(webBundleDescriptor.getWelcomeFilesSet());
this.getErrorPageDescriptorsSet().addAll(webBundleDescriptor.getErrorPageDescriptorsSet());
this.getAppListeners().addAll(webBundleDescriptor.getAppListeners());
this.getContextParametersSet().addAll(webBundleDescriptor.getContextParametersSet());
this.getEjbReferenceDescriptors().addAll(webBundleDescriptor.getEjbReferenceDescriptors());
this.getResourceReferenceDescriptors().addAll(webBundleDescriptor.getResourceReferenceDescriptors());
this.getMessageDestinationReferenceDescriptors().addAll(webBundleDescriptor.getMessageDestinationReferenceDescriptors());
this.getServiceReferenceDescriptors().addAll(webBundleDescriptor.getServiceReferenceDescriptors());
this.getEnvironmentProperties().addAll(webBundleDescriptor.getEnvironmentProperties());
this.getSecurityConstraintsSet().addAll(webBundleDescriptor.getSecurityConstraintsSet());
// ServletFilters
// mdf - #4399820 Servlet Filters and their mapping don't appear in inspector
this.getServletFilters().addAll(webBundleDescriptor.getServletFilters());
this.getServletFilterMappings().addAll(webBundleDescriptor.getServletFilterMappings());
this.setLocaleEncodingMappingListDescriptor(webBundleDescriptor.getLocaleEncodingMappingListDescriptor());
this.setJspConfigDescriptor(webBundleDescriptor.getJspConfigDescriptor());
// WebServices
WebServicesDescriptor thisWebServices = this.getWebServices();
WebServicesDescriptor otherWebServices = webBundleDescriptor.getWebServices();
for (Iterator i = otherWebServices.getWebServices().iterator(); i.hasNext();) {
WebService ws = (WebService)i.next();
thisWebServices.addWebService(new WebService(ws));
}
this.changed();
|
public void | addWebComponentDescriptor(WebComponentDescriptor webComponentDescriptor)Adds a new Web Component Descriptor to me.
((WebComponentDescriptor) webComponentDescriptor).setWebBundleDescriptor(this);
for (Iterator wcdIter = getWebComponentDescriptorsSet().iterator();
wcdIter.hasNext();) {
WebComponentDescriptor wbd = (WebComponentDescriptor)wcdIter.next();
if (wbd.getCanonicalName().equals(
webComponentDescriptor.getCanonicalName())) {
// combine the contents of the two
webComponentDescriptor.add(wbd);
// remove the original one from the set
// so we can add the new one
getWebComponentDescriptorsSet().remove(wbd);
break;
}
}
this.getWebComponentDescriptorsSet().add(webComponentDescriptor);
this.changed();
|
public void | addWelcomeFile(java.lang.String fileUri)Adds a new welcome file to my list.
this.getWelcomeFilesSet().add(fileUri);
this.changed();
|
public java.util.Collection | findReferencedPUs(){@inheritDoc}
Collection<PersistenceUnitDescriptor> pus =
new HashSet<PersistenceUnitDescriptor>(
findReferencedPUsViaPURefs(this));
pus.addAll(findReferencedPUsViaPCRefs(this));
return pus;
|
public java.util.Vector | getAppListenerDescriptors()
return (Vector)this.getAppListeners().clone();
|
private java.util.Vector | getAppListeners()
if (this.appListenerDescriptors == null) {
this.appListenerDescriptors = new Vector();
}
return this.appListenerDescriptors;
|
public java.util.Enumeration | getContextParameters()Returns my COntext Parameters in an enumeration.
return (new Vector(this.getContextParametersSet())).elements();
|
public java.util.Set | getContextParametersSet()Returns the Set og my COntext Parameters.
if (this.contextParameters == null) {
this.contextParameters = new OrderedSet();
}
return this.contextParameters = new OrderedSet(this.contextParameters);
|
public java.lang.String | getContextRoot()return the name of my context root
if (getModuleDescriptor()!=null && getModuleDescriptor().getContextRoot()!=null) {
return getModuleDescriptor().getContextRoot();
}
if (this.contextRoot == null) {
this.contextRoot = "";
}
return this.contextRoot;
|
public java.lang.String | getDefaultSpecVersion()
return WebBundleNode.SPEC_VERSION;
|
public java.lang.String | getDeploymentDescriptorDir()
return DEPLOYMENT_DESCRIPTOR_DIR;
|
public com.sun.enterprise.deployment.types.EjbReference | getEjbReference(java.lang.String name)
for (Iterator itr = this.getEjbReferenceDescriptors().iterator(); itr.hasNext();) {
EjbReference er = (EjbReference) itr.next();
if (er.getName().equals(name)) {
return er;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionwebapphasnoejbrefbyname",
"This web app [{0}] has no ejb reference by the name of [{1}] ", new Object[] {getName(), name}));
|
public EjbReferenceDescriptor | getEjbReferenceByName(java.lang.String name)Returns an Enterprise Bean with the matching name or throw.
return (EjbReferenceDescriptor) getEjbReference(name);
|
public java.util.Set | getEjbReferenceDescriptors()Returns the Set of my references to Enterprise Beans.
if (this.ejbReferences == null) {
this.ejbReferences = new OrderedSet();
}
return this.ejbReferences = new OrderedSet(this.ejbReferences);
|
public java.util.Enumeration | getEjbReferences()Returns the enumeration of my references to Enterprise Beans.
return (new Vector(this.getEjbReferenceDescriptors())).elements();
|
public EntityManagerFactoryReferenceDescriptor | getEntityManagerFactoryReferenceByName(java.lang.String name)Return the entity manager factory reference descriptor corresponding to
the given name.
for (EntityManagerFactoryReferenceDescriptor next :
getEntityManagerFactoryReferenceDescriptors()) {
if (next.getName().equals(name)) {
return next;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"exceptionwebapphasnoentitymgrfactoryrefbyname",
"This web app [{0}] has no entity manager factory reference by the name of [{1}]",
new Object[] {getName(), name}));
|
public java.util.Set | getEntityManagerFactoryReferenceDescriptors()
return entityManagerFactoryReferences;
|
public EntityManagerReferenceDescriptor | getEntityManagerReferenceByName(java.lang.String name)Return the entity manager factory reference descriptor corresponding to
the given name.
for (EntityManagerReferenceDescriptor next :
getEntityManagerReferenceDescriptors()) {
if (next.getName().equals(name)) {
return next;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"exceptionwebapphasnoentitymgrrefbyname",
"This web app [{0}] has no entity manager reference by the name of [{1}]",
new Object[] {getName(), name}));
|
public java.util.Set | getEntityManagerReferenceDescriptors()
return entityManagerReferences;
|
public java.util.Enumeration | getEnvironmentEntries()Return my set of environment properties.
return (new Vector(this.getEnvironmentEntrySet())).elements();
|
private java.util.Set | getEnvironmentEntrySet()
if (this.environmentEntries == null) {
this.environmentEntries = new OrderedSet();
}
return this.environmentEntries = new OrderedSet(environmentEntries);
|
public java.util.Set | getEnvironmentProperties()Return my set of environment properties.
return this.getEnvironmentEntrySet();
|
public EnvironmentProperty | getEnvironmentPropertyByName(java.lang.String name)Returns the environment property object searching on the supplied key.
throws an illegal argument exception if no such environment property exists.
for (Iterator itr = this.getEnvironmentEntrySet().iterator();
itr.hasNext();) {
EnvironmentProperty ev = (EnvironmentProperty) itr.next();
if (ev.getName().equals(name)) {
return ev;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionwebapphasnoenvpropertybyname",
"This web app [{0}] has no environment property by the name of [{1}]",
new Object[] {getName(), name}));
|
public com.sun.enterprise.deployment.web.ErrorPageDescriptor | getErrorPageDescriptorBySignifier(java.lang.String signifier)Search my error pages for one with thei given signifier or null if there isn't one.
for (Iterator itr = this.getErrorPageDescriptorsSet().iterator(); itr.hasNext();) {
ErrorPageDescriptorImpl next = (ErrorPageDescriptorImpl) itr.next();
if (next.getErrorSignifierAsString().equals(signifier)) {
return next;
}
}
return null;
|
public java.util.Enumeration | getErrorPageDescriptors()Returns an enumeration of the error pages I have.
return (new Vector(this.getErrorPageDescriptorsSet())).elements();
|
private java.util.Set | getErrorPageDescriptorsSet()
if (this.errorPageDescriptors == null) {
this.errorPageDescriptors = new HashSet();
}
return this.errorPageDescriptors;
|
protected java.util.List | getInjectableResourcesByClass(java.lang.String className, JndiNameEnvironment jndiNameEnv)
List<InjectionCapable> injectables =
new LinkedList<InjectionCapable>();
for(InjectionCapable next : getInjectableResources(jndiNameEnv) ) {
if( next.isInjectable()) {
for (InjectionTarget target : next.getInjectionTargets()) {
if (target.getClassName().equals(className) ) {
injectables.add(next);
}
}
}
}
if(((WebBundleDescriptor)jndiNameEnv).hasWebServices()) {
// Add @Resource WebServiceContext present in endpoint impl class to the list of
// injectable resources; We do this for servelt endpoint only because the actual
// endpoint impl class gets replaced by JAXWSServlet in web.xml and hence
// will never be added as an injectable resource
for(InjectionCapable next : getInjectableResources(this) ) {
if( next.isInjectable()) {
for (InjectionTarget target : next.getInjectionTargets()) {
Iterator<WebServiceEndpoint> epIter = getWebServices().getEndpoints().iterator();
while(epIter.hasNext()) {
String servletImplClass = epIter.next().getServletImplClass();
if (target.getClassName().equals(servletImplClass) ) {
injectables.add(next);
}
}
}
}
}
}
return injectables;
|
public java.util.List | getInjectableResourcesByClass(java.lang.String className)
return(getInjectableResourcesByClass(className, this));
|
public InjectionInfo | getInjectionInfoByClass(java.lang.String className)
return(getInjectionInfoByClass(className, this));
|
public JmsDestinationReferenceDescriptor | getJmsDestinationReferenceByName(java.lang.String name)Return a JMS destination reference by the same name or throw an IllegalArgumentException.
for (Iterator itr = this.getJmsDestinationReferenceDescriptors().iterator(); itr.hasNext();) {
JmsDestinationReferenceDescriptor jdr = (JmsDestinationReferenceDescriptor) itr.next();
if (jdr.getName().equals(name)) {
return jdr;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionwebapphasnojmsdestrefbyname",
"This web app [{0}] has no resource environment reference by the name of [{1}]", new Object[] {getName(), name}));
|
public java.util.Set | getJmsDestinationReferenceDescriptors()Return the set of JMS destination references this ejb declares.
if (this.jmsDestReferences == null) {
this.jmsDestReferences = new OrderedSet();
}
return this.jmsDestReferences = new OrderedSet(this.jmsDestReferences);
|
public JspConfigDescriptor | getJspConfigDescriptor()
return jspConfigDescriptor;
|
public java.util.Set | getJspDescriptors()Return my Set of jsps.
Set jspDescriptors = new HashSet();
for (Iterator itr = this.getWebComponentDescriptorsSet().iterator(); itr.hasNext();) {
WebComponentDescriptor next = (WebComponentDescriptor) itr.next();
if (!next.isServlet()) {
jspDescriptors.add(next);
}
}
return jspDescriptors;
|
public LocaleEncodingMappingListDescriptor | getLocaleEncodingMappingListDescriptor()
return localeEncodingMappingDesc;
|
public java.util.Enumeration | getLocalizedContentDescriptors()Unused.
return (new Vector()).elements();
|
public com.sun.enterprise.deployment.web.LoginConfiguration | getLoginConfiguration()Return the information about how I should log in.
return this.loginConfiguration;
|
public MessageDestinationReferenceDescriptor | getMessageDestinationReferenceByName(java.lang.String name)Looks up an message destination reference with the given name.
Throws an IllegalArgumentException if it is not found.
for (Iterator itr =
this.getMessageDestinationReferenceDescriptors().iterator();
itr.hasNext();) {
MessageDestinationReferenceDescriptor mdr =
(MessageDestinationReferenceDescriptor) itr.next();
if (mdr.getName().equals(name)) {
return mdr;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"exceptionwebapphasnomsgdestrefbyname",
"This web app [{0}] has no message destination reference by the name of [{1}]",
new Object[] {getName(), name}));
|
public java.util.Set | getMessageDestinationReferenceDescriptors()
if( this.messageDestReferences == null ) {
this.messageDestReferences = new OrderedSet();
}
return this.messageDestReferences =
new OrderedSet(this.messageDestReferences);
|
public java.util.Enumeration | getMimeMappings()Returns an enumeration of my mime mappings.
return (new Vector(this.getMimeMappingsSet())).elements();
|
private java.util.Set | getMimeMappingsSet()
if (this.mimeMappings == null) {
this.mimeMappings = new HashSet();
}
return this.mimeMappings;
|
public javax.enterprise.deploy.shared.ModuleType | getModuleType()
return ModuleType.WAR;
|
public java.util.Collection | getNamedDescriptors()Return the set of named descriptors that I have.
return super.getNamedDescriptorsFrom(this);
|
public java.util.Vector | getNamedReferencePairs()Return the saet of NamedReferencePairs that I have.
return super.getNamedReferencePairsFrom(this);
|
public LifecycleCallbackDescriptor | getPostConstructDescriptorByClass(java.lang.String className)
return getPostConstructDescriptorByClass(className, this);
|
public java.util.Set | getPostConstructDescriptors()
return postConstructDescs;
|
public LifecycleCallbackDescriptor | getPreDestroyDescriptorByClass(java.lang.String className)
return getPreDestroyDescriptorByClass(className, this);
|
public java.util.Set | getPreDestroyDescriptors()
return preDestroyDescs;
|
public ResourceReferenceDescriptor | getResourceReferenceByName(java.lang.String name)Returns a reource reference with the matching name or throw.
for (Iterator itr = this.getResourceReferenceDescriptors().iterator(); itr.hasNext();) {
ResourceReferenceDescriptor next = (ResourceReferenceDescriptor) itr.next();
if (next.getName().equals(name)) {
return next;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionwebapphasnoresourcerefbyname",
"This web app [{0}] has no resource reference by the name of [{1}]", new Object[] {getName(), name}));
|
public java.util.Set | getResourceReferenceDescriptors()RReturns my Set of references to resources.
if (this.resourceReferences == null) {
this.resourceReferences = new OrderedSet();
}
return this.resourceReferences = new OrderedSet(this.resourceReferences);
|
public java.util.Enumeration | getResourceReferences()Return an enumeration of references to resources that I have.
return (new Vector(this.getResourceReferenceDescriptors())).elements();
|
public java.util.Enumeration | getSecurityConstraints()My list of security constraints.
return (new Vector(this.getSecurityConstraintsSet())).elements();
|
public java.util.Collection | getSecurityConstraintsForUrlPattern(java.lang.String urlPattern)
Collection constraints = new HashSet();
for(Iterator i = getSecurityConstraintsSet().iterator(); i.hasNext();) {
SecurityConstraint next = (SecurityConstraint) i.next();
boolean include = false;
for(Enumeration wrc = next.getWebResourceCollections();
wrc.hasMoreElements();) {
WebResourceCollection nextCol = (WebResourceCollection)
wrc.nextElement();
for(Enumeration up = nextCol.getUrlPatterns();
up.hasMoreElements();) {
String nextPattern = (String) up.nextElement();
if((urlPattern != null) && urlPattern.equals(nextPattern)) {
include = true;
break;
}
}
if( include ) { break; }
}
if( include ) { constraints.add(next); }
}
return constraints;
|
private java.util.Set | getSecurityConstraintsSet()
if (this.securityConstraints == null) {
this.securityConstraints = new HashSet();
}
return this.securityConstraints;
|
public com.sun.enterprise.deployment.web.SecurityRoleReference | getSecurityRoleReferenceByName(java.lang.String compName, java.lang.String roleName)Return all the references by a given component (by name) to the given rolename.
for(Enumeration e = this.getWebComponentDescriptors(); e.hasMoreElements();){
WebComponentDescriptor comp = (WebComponentDescriptor) e.nextElement();
if(!comp.getCanonicalName().equals(compName))
continue;
SecurityRoleReference r = comp.getSecurityRoleReferenceByName(roleName);
if(r != null)
return r;
}
return null;
|
public java.util.Enumeration | getSecurityRoles()Returns an Enumeration of my SecurityRole objects.
Vector securityRoles = new Vector();
for (Iterator itr = super.getRoles().iterator(); itr.hasNext();) {
Role r = (Role) itr.next();
SecurityRoleDescriptor srd = new SecurityRoleDescriptor(r);
securityRoles.add(srd);
}
return securityRoles.elements();
|
public ServiceReferenceDescriptor | getServiceReferenceByName(java.lang.String name)Looks up an service reference with the given name.
Throws an IllegalArgumentException if it is not found.
for (Iterator itr = this.getServiceReferenceDescriptors().iterator();
itr.hasNext();) {
ServiceReferenceDescriptor srd = (ServiceReferenceDescriptor)
itr.next();
if (srd.getName().equals(name)) {
return srd;
}
}
throw new IllegalArgumentException(localStrings.getLocalString(
"enterprise.deployment.exceptionwebapphasnoservicerefbyname",
"This web app [{0}] has no service reference by the name of [{1}]",
new Object[] {getName(), name}));
|
public java.util.Set | getServiceReferenceDescriptors()
if( this.serviceReferences == null ) {
this.serviceReferences = new OrderedSet();
}
return this.serviceReferences = new OrderedSet(this.serviceReferences);
|
public java.util.Set | getServletDescriptors()
Set servletDescriptors = new HashSet();
for (Iterator itr = this.getWebComponentDescriptorsSet().iterator(); itr.hasNext();) {
WebComponentDescriptor next = (WebComponentDescriptor) itr.next();
if (next.isServlet()) {
servletDescriptors.add(next);
}
}
return servletDescriptors;
|
public java.util.Vector | getServletFilterDescriptors()Return a Vector of servlet filters that I have.
return (Vector)this.getServletFilters().clone();
|
public java.util.Vector | getServletFilterMappingDescriptors()Return a Vector of servlet filter mappings that I have.
return (Vector)this.getServletFilterMappings().clone();
|
public java.util.Vector | getServletFilterMappings()Return a Vector of servlet filters that I have.
if (this.servletFilterMappings == null) {
this.servletFilterMappings = new Vector();
}
return this.servletFilterMappings;
|
public java.util.Vector | getServletFilters()Return a Vector of servlet filters that I have.
if (this.servletFilters == null) {
this.servletFilters = new Vector();
}
return this.servletFilters;
|
public int | getSessionTimeout()Return the value in seconds of when requests should time out.
return this.sessionTimeout;
|
public com.sun.enterprise.deployment.runtime.web.SunWebApp | getSunDescriptor()This returns the extra web sun specific info not in the RI DID.
if (sunWebApp==null) {
sunWebApp = new SunWebApp();
}
return sunWebApp;
|
public WebComponentDescriptor | getWebComponentByCanonicalName(java.lang.String name)Search for a web component that I have by name.
for (Iterator itr = this.getWebComponentDescriptorsSet().iterator(); itr.hasNext();) {
WebComponentDescriptor next = (WebComponentDescriptor) itr.next();
if (next.getCanonicalName().equals(name)) {
return (WebComponentDescriptor) next;
}
}
return null;
|
public WebComponentDescriptor[] | getWebComponentByImplName(java.lang.String name)
ArrayList<WebComponentDescriptor> webCompList =
new ArrayList<WebComponentDescriptor>();
for (Object webCompObj : this.getWebDescriptors()) {
WebComponentDescriptor webComp = (WebComponentDescriptor)webCompObj;
if (webComp.getWebComponentImplementation().equals(name)) {
webCompList.add(webComp);
}
}
return webCompList.toArray(new WebComponentDescriptor[webCompList.size()]);
|
public WebComponentDescriptor | getWebComponentByName(java.lang.String name)Search for a web component that I have by name.
for (Iterator itr = this.getWebComponentDescriptorsSet().iterator(); itr.hasNext();) {
Descriptor next = (Descriptor) itr.next();
if (next.getName().equals(name)) {
return (WebComponentDescriptor) next;
}
}
return null;
|
public java.util.Enumeration | getWebComponentDescriptors()Return an Enumeration of Web COmponent Descriptors (JSP or JavaServlets) in me.
return (new Vector(this.getWebComponentDescriptorsSet())).elements();
|
public java.util.Set | getWebComponentDescriptorsSet()
if (this.webComponentDescriptors == null) {
this.webComponentDescriptors = new OrderedSet();
}
return this.webComponentDescriptors;
|
public java.util.Set | getWebDescriptors()Return the Set of Web COmponent Descriptors (JSP or JavaServlets) in me.
if (this.webComponentDescriptors == null) {
this.webComponentDescriptors = new OrderedSet();
}
return this.webComponentDescriptors;
|
public java.util.Enumeration | getWelcomeFiles()Return an enumeration of the welcome files I have..
return (new Vector(this.getWelcomeFilesSet())).elements();
|
public java.util.Set | getWelcomeFilesSet()
if (this.welcomeFiles == null) {
this.welcomeFiles = new OrderedSet();
}
return welcomeFiles;
|
public boolean | hasServiceReferenceDescriptors()WEB SERVICES REF APIS
if (serviceReferences==null)
return false;
return serviceReferences.size()!=0;
|
public boolean | hasWebServiceClients()
return !getServiceReferenceDescriptors().isEmpty();
|
public boolean | isDistributable()Return true if this web app [{0}] can be distributed across different processes.
return isDistributable;
|
public void | moveAppListenerDescriptor(com.sun.enterprise.deployment.web.AppListenerDescriptor ref, int relPos)
this.moveVectorItem(this.getAppListeners(), ref, relPos);
this.changed();
|
public void | moveServletFilterMapping(com.sun.enterprise.deployment.web.ServletFilterMapping ref, int relPos)Moves the given servlet filter mapping to a new relative location in
the list
this.moveVectorItem(this.getServletFilterMappings(), ref, relPos);
this.changed();
|
protected void | moveVectorItem(java.util.Vector list, java.lang.Object ref, int rpos)Moves the given object to a new relative location in the specified list
/* get current position of ref */
// 'indexOf' is not used because it is base on 'equals()' which may
// not be unique.
int size = list.size(), old_pos = size - 1;
for (;old_pos >= 0; old_pos--) {
if (ref == list.elementAt(old_pos)) {
break;
}
}
if (old_pos < 0) {
return; // not found
}
/* limit up/down movement */
int new_pos = old_pos + rpos;
if (new_pos < 0) {
new_pos = 0; // limit movement
} else
if (new_pos >= size) {
new_pos = size - 1; // limit movement
}
/* is it really moving? */
if (new_pos == old_pos) {
return; // it's not moving
}
/* move it */
list.removeElementAt(old_pos);
list.insertElementAt(ref, new_pos);
this.changed();
|
public void | notification(com.sun.enterprise.util.NotificationEvent ne)
// currently, notifications come only from the WebServiceBundleDescriptor
this.changed();
|
public void | print(java.lang.StringBuffer toStringBuffer)Return a formatted version as a String.
toStringBuffer.append("\nWeb Bundle descriptor");
toStringBuffer.append("\n");
super.print(toStringBuffer);
toStringBuffer.append( "\n context root ").append(getContextRoot());
toStringBuffer.append( "\n sessionTimeout ").append(sessionTimeout);
toStringBuffer.append( "\n mimeMappings ").append(mimeMappings);
toStringBuffer.append( "\n welcomeFiles ").append(welcomeFiles);
toStringBuffer.append( "\n errorPageDescriptors ").append(errorPageDescriptors);
toStringBuffer.append( "\n appListenerDescriptors ").append(appListenerDescriptors);
toStringBuffer.append( "\n contextParameters ").append(contextParameters);
toStringBuffer.append( "\n ejbReferences ");
if(ejbReferences != null)
printDescriptorSet(ejbReferences,toStringBuffer);
toStringBuffer.append( "\n jmsDestReferences ");
if(jmsDestReferences != null)
printDescriptorSet(jmsDestReferences,toStringBuffer);
toStringBuffer.append( "\n messageDestReferences ");
if(messageDestReferences != null)
printDescriptorSet(messageDestReferences,toStringBuffer);
toStringBuffer.append( "\n resourceReferences ");
if(resourceReferences != null)
printDescriptorSet(resourceReferences,toStringBuffer);
toStringBuffer.append( "\n serviceReferences ");
if(serviceReferences != null)
printDescriptorSet(serviceReferences,toStringBuffer);
toStringBuffer.append( "\n isDistributable ").append(isDistributable);
toStringBuffer.append( "\n securityRoles ").append(securityRoles);
toStringBuffer.append( "\n securityConstraints ").append(securityConstraints);
toStringBuffer.append( "\n contextRoot ").append(contextRoot);
toStringBuffer.append( "\n loginConfiguration ").append(this.loginConfiguration);
toStringBuffer.append( "\n webComponentDescriptors ");
if(webComponentDescriptors != null)
printDescriptorSet(webComponentDescriptors,toStringBuffer);
toStringBuffer.append( "\n environmentEntries ");
if(environmentEntries != null)
printDescriptorSet(environmentEntries,toStringBuffer);
if (sunWebApp!=null) {
toStringBuffer.append( "\n ========== Runtime Descriptors =========");
toStringBuffer.append( "\n").append(sunWebApp.toString());
}
|
private void | printDescriptorSet(java.util.Set descSet, java.lang.StringBuffer sbuf)
if (descSet==null)
return;
for(Iterator itr = descSet.iterator(); itr.hasNext();){
Object obj = itr.next();
if(obj instanceof Descriptor)
((Descriptor)obj).print(sbuf);
else
sbuf.append(obj);
}
|
public void | removeAppListenerDescriptor(com.sun.enterprise.deployment.web.AppListenerDescriptor ref)
this.removeVectorItem(this.getAppListeners(), ref);
//this.getAppListeners().removeElement(ref);
this.changed();
|
public void | removeContextParameter(com.sun.enterprise.deployment.web.ContextParameter contextParameter)Removes the given context parameter from my list.
this.getContextParametersSet().remove(contextParameter);
this.changed();
|
public void | removeEjbReferenceDescriptor(EjbReferenceDescriptor ejbReferenceDescriptor)Removes a reference to an ejb.
this.removeEjbReferenceDescriptor((EjbReference) ejbReferenceDescriptor);
|
public void | removeEjbReferenceDescriptor(com.sun.enterprise.deployment.types.EjbReference ejbReferenceDescriptor)
this.getEjbReferenceDescriptors().remove(ejbReferenceDescriptor);
ejbReferenceDescriptor.setReferringBundleDescriptor(null);
this.changed();
|
public void | removeEnvironmentEntry(com.sun.enterprise.deployment.web.EnvironmentEntry environmentEntry)Removes this given environment property from my list.
this.getEnvironmentEntrySet().remove(environmentEntry);
this.changed();
|
public void | removeEnvironmentProperty(EnvironmentProperty environmentProperty)Removes this given environment property from my list.
this.getEnvironmentEntrySet().remove(environmentProperty);
this.changed();
|
public void | removeErrorPageDescriptor(com.sun.enterprise.deployment.web.ErrorPageDescriptor errorPageDescriptor)Removes the given error page from my list.
this.getErrorPageDescriptorsSet().remove(errorPageDescriptor);
this.changed();
|
public void | removeJmsDestinationReferenceDescriptor(JmsDestinationReferenceDescriptor jmsDestReference)
this.getJmsDestinationReferenceDescriptors().remove(jmsDestReference);
this.changed();
|
public void | removeMessageDestinationReferenceDescriptor(MessageDestinationReferenceDescriptor msgDestRef)
this.getMessageDestinationReferenceDescriptors().remove(msgDestRef);
this.changed();
|
public void | removeMimeMapping(com.sun.enterprise.deployment.web.MimeMapping mimeMapping)Removes the given mime mapping from my list.
this.getMimeMappingsSet().remove(mimeMapping);
this.changed();
|
public void | removeResourceReferenceDescriptor(ResourceReferenceDescriptor resourceReference)removes a reference to a resource.
this.getResourceReferenceDescriptors().remove(resourceReference);
this.changed();
|
public void | removeSecurityConstraint(com.sun.enterprise.deployment.web.SecurityConstraint securityConstraint)Remove the given security constraint.
this.getSecurityConstraintsSet().remove(securityConstraint);
this.changed();
|
public void | removeServiceReferenceDescriptor(ServiceReferenceDescriptor serviceRef)
this.getServiceReferenceDescriptors().remove(serviceRef);
this.changed();
|
public void | removeServletFilter(com.sun.enterprise.deployment.web.ServletFilter ref)Removes the given servlet filter from this web component.
this.removeVectorItem(this.getServletFilters(), ref);
//this.getServletFilters().removeElement(ref); ** is based on 'equals()'
this.changed();
|
public void | removeServletFilterMapping(com.sun.enterprise.deployment.web.ServletFilterMapping ref)Removes the given servlet filter mapping from this web component.
this.removeVectorItem(this.getServletFilterMappings(), ref);
//this.getServletFilterMappings().removeElement(ref);
this.changed();
|
protected boolean | removeVectorItem(java.util.Vector list, java.lang.Object ref)remove a specific object from the given list (does not rely on 'equals')
for (Iterator i = list.iterator(); i.hasNext();) {
if (ref == i.next()) {
i.remove();
return true;
}
}
return false;
|
public void | removeWebComponentDescriptor(WebComponentDescriptor webComponentDescriptor)Remove the given web component from me.
((WebComponentDescriptor) webComponentDescriptor).setWebBundleDescriptor(null);
this.getWebComponentDescriptorsSet().remove(webComponentDescriptor);
this.changed();
|
public void | removeWelcomeFile(java.lang.String fileUri)Removes a welcome file from my list.
this.getWelcomeFilesSet().remove(fileUri);
this.changed();
|
public void | setAppListeners(java.util.Collection c)
this.getAppListeners().clear();
this.getAppListeners().addAll(c);
this.changed();
|
public void | setContextRoot(java.lang.String contextRoot)Set the name of my context root.
if (getModuleDescriptor()!=null) {
getModuleDescriptor().setContextRoot(contextRoot);
}
this.contextRoot = contextRoot;
this.changed();
|
public void | setDistributable(boolean isDistributable)Sets whether this web app [{0}] can be distributed across different processes.
this.isDistributable = isDistributable;
this.changed();
|
public void | setJspConfigDescriptor(JspConfigDescriptor jspC)
if (jspConfigDescriptor != null) {
jspConfigDescriptor.removeNotificationListener(this);
}
jspConfigDescriptor = jspC;
if (jspC != null) {
jspC.addNotificationListener(this);
}
|
public void | setLocaleEncodingMappingListDescriptor(LocaleEncodingMappingListDescriptor lemDesc)
localeEncodingMappingDesc = lemDesc;
|
public void | setLoginConfiguration(com.sun.enterprise.deployment.web.LoginConfiguration loginConfiguration)Specifies the information about how I should log in.
this.loginConfiguration = loginConfiguration;
this.changed();
|
public void | setLoginConfiguration(LoginConfigurationImpl loginConfiguration)
setLoginConfiguration((LoginConfiguration) loginConfiguration);
|
public void | setMimeMappings(java.util.Set mimeMappings)Sets the Set of Mime Mappings for this web app [{0}]lication.
this.mimeMappings = mimeMappings;
this.changed();
|
public void | setSessionTimeout(int sessionTimeout)Sets thew value in seconds after sessions should timeout.
this.sessionTimeout = sessionTimeout;
this.changed();
|
public void | setSunDescriptor(com.sun.enterprise.deployment.runtime.web.SunWebApp webApp)This sets the extra web sun specific info not in the RI DID.
this.sunWebApp = webApp;
|
public void | setWelcomeFiles(java.util.Set welcomeFiles)Sets the collection of my welcome files.
this.welcomeFiles = welcomeFiles;
this.changed();
|
public void | visit(com.sun.enterprise.deployment.util.DescriptorVisitor aVisitor)visitor API implementation
if (aVisitor instanceof WebBundleVisitor) {
visit((WebBundleVisitor) aVisitor);
} else {
super.visit(aVisitor);
}
|
public void | visit(com.sun.enterprise.deployment.util.WebBundleVisitor aVisitor)visitor API implementation
super.visit(aVisitor);
aVisitor.accept(this);
// Visit all injectables first. In some cases, basic type information
// has to be derived from target inject method or inject field.
for(InjectionCapable injectable : getInjectableResources(this)) {
aVisitor.accept(injectable);
}
for (Iterator i=getWebComponentDescriptorsSet().iterator();i.hasNext();) {
WebComponentDescriptor aWebComp = (WebComponentDescriptor) i.next();
aVisitor.accept(aWebComp);
}
for (Iterator itr=getWebServices().getWebServices().iterator();
itr.hasNext(); ) {
WebService aWebService = (WebService) itr.next();
aVisitor.accept(aWebService);
}
for (Iterator itr = getEjbReferenceDescriptors().iterator();itr.hasNext();) {
EjbReference aRef = (EjbReference) itr.next();
aVisitor.accept(aRef);
}
for (Iterator itr=getResourceReferenceDescriptors().iterator();
itr.hasNext();) {
ResourceReferenceDescriptor next =
(ResourceReferenceDescriptor) itr.next();
aVisitor.accept(next);
}
for (Iterator itr=getJmsDestinationReferenceDescriptors().iterator();
itr.hasNext();) {
JmsDestinationReferenceDescriptor next =
(JmsDestinationReferenceDescriptor) itr.next();
aVisitor.accept(next);
}
for (Iterator itr=getMessageDestinationReferenceDescriptors().iterator();
itr.hasNext();) {
MessageDestinationReferencer next =
(MessageDestinationReferencer) itr.next();
aVisitor.accept(next);
}
for (Iterator itr = getMessageDestinations().iterator();
itr.hasNext();) {
MessageDestinationDescriptor msgDestDescriptor =
(MessageDestinationDescriptor)itr.next();
aVisitor.accept(msgDestDescriptor);
}
for (Iterator itr=getServiceReferenceDescriptors().iterator();
itr.hasNext();) {
aVisitor.accept((ServiceReferenceDescriptor) itr.next());
}
|