com.sun.enterprise.deployment
Class WebResourceCollectionImpl

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.WebResourceCollectionImpl
All Implemented Interfaces:
WebDescriptor, WebResourceCollection, java.io.Serializable

public class WebResourceCollectionImpl
extends Descriptor
implements WebResourceCollection

This descriptor represents a description of a portion of a web app in terms of a collection of url patterns and a collection of http methods on this patterns.

Author:
Danny Coward
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.sun.enterprise.deployment.Descriptor
DESCRIPTION_CHANGED, DESCRIPTOR_CHANGED, docType, LARGE_ICON_CHANGED, NAME_CHANGED, SMALL_ICON_CHANGED
 
Constructor Summary
WebResourceCollectionImpl()
           
 
Method Summary
 void addHttpMethod(java.lang.String httpMethod)
          Adds the given HTTP method to the collection of http methods this collection has.
 void addHttpMethodOmission(java.lang.String httpMethodOmission)
          Adds the given HTTP method omission to the collection of http methods this collection has.
 void addUrlPattern(java.lang.String urlPattern)
          Add a URL pattern to this collection.
 java.util.Set<java.lang.String> getHttpMethodOmissions()
          Return the set of HTTP method omissions this collection has.
 java.lang.String[] getHttpMethodOmissionsAsArray()
          Returns the HttpMethodOmissions this collection has in an array of strings This is added to speed up processing while creating webresource permissions
 java.util.Set<java.lang.String> getHttpMethods()
          Return the enumeration of HTTP methods this collection has.
 java.lang.String[] getHttpMethodsAsArray()
          Returns the HttpMethods this collection has in an array of strings This is added to speed up processing while creating webresource permissions
 java.util.Set<java.lang.String> getUrlPatterns()
          Return my urls patterns (String objects)
 void print(java.lang.StringBuffer toStringBuffer)
          A formatted string of the state.
 void removeHttpMethod(java.lang.String httpMethod)
          Removes the given HTTP method from the collection of http methods.
 void removeHttpMethodOmission(java.lang.String httpMethodOmission)
          Removes the given HTTP method omission from the collection of http methods.
 void removeUrlPattern(java.lang.String urlPattern)
          Remove the specified url pattern from the collection.
 void setHttpMethodOmissions(java.util.Set<java.lang.String> httpMethodOmissions)
          Sets the set of HTTP method omissions this collection has.
 void setHttpMethods(java.util.Set<java.lang.String> httpMethods)
          Sets the set of HTTP methods this collection has.
 void setUrlPatterns(java.util.Set<java.lang.String> urlPatterns)
          Clean out the collection of URL pattern and replace it with the given Set of (String) url patterns.
 
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, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sun.enterprise.deployment.web.WebDescriptor
getDescription, getLargeIconUri, getName, getSmallIconUri, setDescription, setLargeIconUri, setName, setSmallIconUri
 

Constructor Detail

WebResourceCollectionImpl

public WebResourceCollectionImpl()
Method Detail

getUrlPatterns

public java.util.Set<java.lang.String> getUrlPatterns()
Return my urls patterns (String objects)

Specified by:
getUrlPatterns in interface WebResourceCollection
Returns:
the set of the url patterns.

addUrlPattern

public void addUrlPattern(java.lang.String urlPattern)
Add a URL pattern to this collection.

Specified by:
addUrlPattern in interface WebResourceCollection
Parameters:
the - url pattern to be added.

removeUrlPattern

public void removeUrlPattern(java.lang.String urlPattern)
Remove the specified url pattern from the collection.

Parameters:
the - url pattern to be removed.

setUrlPatterns

public void setUrlPatterns(java.util.Set<java.lang.String> urlPatterns)
Clean out the collection of URL pattern and replace it with the given Set of (String) url patterns.

Parameters:
the - url patterns to replace the current set.

getHttpMethods

public java.util.Set<java.lang.String> getHttpMethods()
Return the enumeration of HTTP methods this collection has.

Specified by:
getHttpMethods in interface WebResourceCollection
Returns:
the enumeration of HTTP methods.

getHttpMethodsAsArray

public java.lang.String[] getHttpMethodsAsArray()
Returns the HttpMethods this collection has in an array of strings This is added to speed up processing while creating webresource permissions

Specified by:
getHttpMethodsAsArray in interface WebResourceCollection
Returns:
array of strings of HttpMethods

setHttpMethods

public void setHttpMethods(java.util.Set<java.lang.String> httpMethods)
Sets the set of HTTP methods this collection has.

Parameters:
the - set of HTTP methods.

addHttpMethod

public void addHttpMethod(java.lang.String httpMethod)
Adds the given HTTP method to the collection of http methods this collection has.

Specified by:
addHttpMethod in interface WebResourceCollection
Parameters:
the - HTTP method to be added.

removeHttpMethod

public void removeHttpMethod(java.lang.String httpMethod)
Removes the given HTTP method from the collection of http methods.

Parameters:
the - HTTP method to be removed.

getHttpMethodOmissions

public java.util.Set<java.lang.String> getHttpMethodOmissions()
Return the set of HTTP method omissions this collection has.

Specified by:
getHttpMethodOmissions in interface WebResourceCollection
Returns:
the set of HTTP method omissions.

getHttpMethodOmissionsAsArray

public java.lang.String[] getHttpMethodOmissionsAsArray()
Returns the HttpMethodOmissions this collection has in an array of strings This is added to speed up processing while creating webresource permissions

Specified by:
getHttpMethodOmissionsAsArray in interface WebResourceCollection
Returns:
array of strings of HttpMethodOmissions

setHttpMethodOmissions

public void setHttpMethodOmissions(java.util.Set<java.lang.String> httpMethodOmissions)
Sets the set of HTTP method omissions this collection has.

Parameters:
the - set of HTTP method omissions.

addHttpMethodOmission

public void addHttpMethodOmission(java.lang.String httpMethodOmission)
Adds the given HTTP method omission to the collection of http methods this collection has.

Specified by:
addHttpMethodOmission in interface WebResourceCollection
Parameters:
the - HTTP method to be added.

removeHttpMethodOmission

public void removeHttpMethodOmission(java.lang.String httpMethodOmission)
Removes the given HTTP method omission from the collection of http methods.

Parameters:
the - HTTP method to be removed.

print

public void print(java.lang.StringBuffer toStringBuffer)
A formatted string of the state.

Overrides:
print in class Descriptor


Copyright © 2012 GlassFish Community. All Rights Reserved.