com.sun.enterprise.deployment
Class WebComponentDescriptor

java.lang.Object
  extended by java.util.Observable
      extended by com.sun.enterprise.deployment.DynamicAttributesDescriptor
          extended by com.sun.enterprise.deployment.Descriptor
              extended by com.sun.enterprise.deployment.WebComponentDescriptor
All Implemented Interfaces:
java.io.Serializable

public class WebComponentDescriptor
extends Descriptor

Common data and behavior of the deployment information about a JSP or JavaServlet in J2EE.

Author:
Jerome Dochez
See Also:
Serialized Form

Field Summary
static java.lang.String BASIC_AUTHENTICATION
          Constant for Basic authentication.
static java.lang.String DELETE
          Constant for the http DELET method.
static java.lang.String FORM_AUTHENTICATION
          Constant for Form authentication.
static java.lang.String GET
          Constant for the htpp GET method.
static java.lang.String POST
          Constant for the http POST method.
static java.lang.String PUT
          Constant for the http PUT method.
static java.lang.String SSL_AUTHENTICATION
          Constant for Secure authentication.
 
Fields inherited from class com.sun.enterprise.deployment.Descriptor
DESCRIPTION_CHANGED, DESCRIPTOR_CHANGED, docType, LARGE_ICON_CHANGED, NAME_CHANGED, SMALL_ICON_CHANGED
 
Constructor Summary
WebComponentDescriptor()
          The default constructor.
WebComponentDescriptor(WebComponentDescriptor other)
          The copy constructor.
 
Method Summary
 void add(WebComponentDescriptor other)
           
 void addInitializationParameter(InitializationParameter initializationParameter)
          Adds a servlet initialization parameter to this component.
 void addSecurityRoleReference(SecurityRoleReference securityRoleReference)
          Adds a security role reference to this web component.
 void addUrlPattern(java.lang.String urlPattern)
          Adds an alias to this web component.
 boolean equals(java.lang.Object other)
           
 Application getApplication()
           
 java.lang.String getCanonicalName()
          The canonical name for the web component.
 InitializationParameter getInitializationParameterByName(java.lang.String name)
           
 java.util.Enumeration<InitializationParameter> getInitializationParameters()
           
 java.lang.Integer getLoadOnStartUp()
           
 MultipartConfig getMultipartConfig()
           
 RunAsIdentityDescriptor getRunAsIdentity()
          Gets the run-as of the referee EJB.
 SecurityRoleReference getSecurityRoleReferenceByName(java.lang.String roleReferenceName)
           
 java.util.Enumeration<SecurityRoleReference> getSecurityRoleReferences()
           
 java.util.Enumeration<java.lang.String> getUrlPatterns()
           
 java.util.Set<java.lang.String> getUrlPatternsSet()
           
 java.lang.reflect.Method[] getUserDefinedHttpMethods()
          This method return an array of user defined http doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace methods.
 boolean getUsesCallerIdentity()
           
 WebBundleDescriptor getWebBundleDescriptor()
           
 java.lang.String getWebComponentImplementation()
           
 int hashCode()
           
 java.lang.Boolean isAsyncSupported()
           
 boolean isEnabled()
           
 boolean isServlet()
           
 void print(java.lang.StringBuffer toStringBuffer)
          A formatted string representing my state.
 void removeInitializationParameter(InitializationParameter initializationParameter)
          Removes the given servlet initialization parameter from this component.
 void removeSecurityRoleReference(SecurityRoleReference securityRoleReference)
          Removes the given security role reference from this web component.
 void removeUrlPattern(java.lang.String urlPattern)
          Removes a URL pattern from this web component.
 void setAsyncSupported(java.lang.Boolean asyncSupported)
           
 void setCanonicalName(java.lang.String canonicalName)
          Sets the canonical name of this web component.
 void setEnabled(boolean enabled)
           
 void setLoadOnStartUp(java.lang.Integer loadOnStartUp)
          Sets the order on which this component will be loaded by the web server.
 void setLoadOnStartUp(java.lang.String loadOnStartUp)
          Sets the order on which this component will be loaded by the web server.
 void setMultipartConfig(MultipartConfig multipartConfig)
           
 void setMultipartConfig(MultipartConfigDescriptor multipartConfigDesc)
          DeploymentDescriptorNode.addNodeDescriptor(node) need this.
 void setRunAsIdentity(RunAsIdentityDescriptor runAs)
          Sets the run-as of the referee EJB.
 void setServlet(boolean isServlet)
           
 void setUsesCallerIdentity(boolean isCallerID)
           
 void setWebComponentImplementation(java.lang.String implFile)
          sets the implementation file for this web component, the implementation file is either a servlet class name of a jsp file name.
 
Methods inherited from class com.sun.enterprise.deployment.Descriptor
addDeploymentExtension, addPrefixMapping, createUniqueFilenameAmongst, createUniqueNameAmongst, createUniqueNameAmongstNamedDescriptors, fillDocType, getDeploymentExtensions, getDescription, getDisplayName, getDocType, getLargeIconUri, getLocalizedDescription, getLocalizedDescriptions, getLocalizedDisplayName, getLocalizedDisplayNames, getLocalizedLargeIconUri, getLocalizedLargeIconUris, getLocalizedSmallIconUri, getLocalizedSmallIconUris, getName, getPrefixMapping, getSmallIconUri, isBoundsChecking, setBoundsChecking, setDescription, setDisplayName, setLargeIconUri, setLocalizedDescription, setLocalizedDisplayName, setLocalizedLargeIconUri, setLocalizedSmallIconUri, setName, setSmallIconUri, visit
 
Methods inherited from class com.sun.enterprise.deployment.DynamicAttributesDescriptor
addExtraAttribute, getExtraAttribute, getExtraAttributes, removeExtraAttribute, toString
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BASIC_AUTHENTICATION

public static final java.lang.String BASIC_AUTHENTICATION
Constant for Basic authentication.

See Also:
Constant Field Values

FORM_AUTHENTICATION

public static final java.lang.String FORM_AUTHENTICATION
Constant for Form authentication.

See Also:
Constant Field Values

SSL_AUTHENTICATION

public static final java.lang.String SSL_AUTHENTICATION
Constant for Secure authentication.

See Also:
Constant Field Values

GET

public static final java.lang.String GET
Constant for the htpp GET method.

See Also:
Constant Field Values

PUT

public static final java.lang.String PUT
Constant for the http PUT method.

See Also:
Constant Field Values

POST

public static final java.lang.String POST
Constant for the http POST method.

See Also:
Constant Field Values

DELETE

public static final java.lang.String DELETE
Constant for the http DELET method.

See Also:
Constant Field Values
Constructor Detail

WebComponentDescriptor

public WebComponentDescriptor()
The default constructor.


WebComponentDescriptor

public WebComponentDescriptor(WebComponentDescriptor other)
The copy constructor.

Method Detail

getInitializationParameters

public java.util.Enumeration<InitializationParameter> getInitializationParameters()
Returns:
the Set of servlet initialization parameters.

getInitializationParameterByName

public InitializationParameter getInitializationParameterByName(java.lang.String name)
Returns:
a matching initialization parameter by its name if there is one.

addInitializationParameter

public void addInitializationParameter(InitializationParameter initializationParameter)
Adds a servlet initialization parameter to this component.


removeInitializationParameter

public void removeInitializationParameter(InitializationParameter initializationParameter)
Removes the given servlet initialization parameter from this component.


getUrlPatternsSet

public java.util.Set<java.lang.String> getUrlPatternsSet()
Returns:
the set of URL pattern aliases for this component.

getUrlPatterns

public java.util.Enumeration<java.lang.String> getUrlPatterns()
Returns:
an enumeration of (String) URL pattern aliases for this component.

addUrlPattern

public void addUrlPattern(java.lang.String urlPattern)
Adds an alias to this web component.


removeUrlPattern

public void removeUrlPattern(java.lang.String urlPattern)
Removes a URL pattern from this web component.


getWebBundleDescriptor

public WebBundleDescriptor getWebBundleDescriptor()
Returns:
the web app object to which I belong or null

getCanonicalName

public java.lang.String getCanonicalName()
The canonical name for the web component.


setCanonicalName

public void setCanonicalName(java.lang.String canonicalName)
Sets the canonical name of this web component.


getLoadOnStartUp

public java.lang.Integer getLoadOnStartUp()
Returns:
the order on which this component will be loaded by the web server.

setLoadOnStartUp

public void setLoadOnStartUp(java.lang.Integer loadOnStartUp)
Sets the order on which this component will be loaded by the web server.


setLoadOnStartUp

public void setLoadOnStartUp(java.lang.String loadOnStartUp)
                      throws java.lang.NumberFormatException
Sets the order on which this component will be loaded by the web server.

Throws:
java.lang.NumberFormatException

getSecurityRoleReferences

public java.util.Enumeration<SecurityRoleReference> getSecurityRoleReferences()
Returns:
the Set of security role references that I have.

getSecurityRoleReferenceByName

public SecurityRoleReference getSecurityRoleReferenceByName(java.lang.String roleReferenceName)
Returns:
a matching role reference by name or null if there is none matching.

addSecurityRoleReference

public void addSecurityRoleReference(SecurityRoleReference securityRoleReference)
Adds a security role reference to this web component.


removeSecurityRoleReference

public void removeSecurityRoleReference(SecurityRoleReference securityRoleReference)
Removes the given security role reference from this web component.


setRunAsIdentity

public void setRunAsIdentity(RunAsIdentityDescriptor runAs)
Sets the run-as of the referee EJB.

Parameters:
runAs - the value of run-as

getRunAsIdentity

public RunAsIdentityDescriptor getRunAsIdentity()
Gets the run-as of the referee EJB.

Returns:
the value of run-as.

getUsesCallerIdentity

public boolean getUsesCallerIdentity()

setUsesCallerIdentity

public void setUsesCallerIdentity(boolean isCallerID)

getMultipartConfig

public MultipartConfig getMultipartConfig()

setMultipartConfig

public void setMultipartConfig(MultipartConfig multipartConfig)

setMultipartConfig

public void setMultipartConfig(MultipartConfigDescriptor multipartConfigDesc)
DeploymentDescriptorNode.addNodeDescriptor(node) need this.


getApplication

public Application getApplication()

setWebComponentImplementation

public void setWebComponentImplementation(java.lang.String implFile)
sets the implementation file for this web component, the implementation file is either a servlet class name of a jsp file name.

Parameters:
implFile - the servlet class name or the jsp file

getWebComponentImplementation

public java.lang.String getWebComponentImplementation()

isServlet

public boolean isServlet()

setServlet

public void setServlet(boolean isServlet)

isEnabled

public boolean isEnabled()

setEnabled

public void setEnabled(boolean enabled)

setAsyncSupported

public void setAsyncSupported(java.lang.Boolean asyncSupported)

isAsyncSupported

public java.lang.Boolean isAsyncSupported()

getUserDefinedHttpMethods

public java.lang.reflect.Method[] getUserDefinedHttpMethods()
This method return an array of user defined http doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace methods. It is used for processing web security annotations.

Returns:
an array of methods.

print

public void print(java.lang.StringBuffer toStringBuffer)
A formatted string representing my state.

Overrides:
print in class Descriptor

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

add

public void add(WebComponentDescriptor other)


Copyright © 2012 GlassFish Community. All Rights Reserved.