Class WebResourceCollectionImpl
- java.lang.Object
-
- java.util.Observable
-
- org.glassfish.deployment.common.DynamicAttributesDescriptor
-
- org.glassfish.deployment.common.Descriptor
-
- org.glassfish.web.deployment.descriptor.WebResourceCollectionImpl
-
- All Implemented Interfaces:
WebDescriptor
,WebResourceCollection
,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 org.glassfish.deployment.common.Descriptor
DESCRIPTION_CHANGED, DESCRIPTOR_CHANGED, docType, LARGE_ICON_CHANGED, NAME_CHANGED, SMALL_ICON_CHANGED
-
-
Constructor Summary
Constructors Constructor Description WebResourceCollectionImpl()
WebResourceCollectionImpl(WebResourceCollectionImpl other)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addHttpMethod(String httpMethod)
Adds the given HTTP method to the collection of http methods this collection has.void
addHttpMethodOmission(String httpMethodOmission)
Adds the given HTTP method omission to the collection of http methods this collection has.void
addUrlPattern(String urlPattern)
Add a URL pattern to this collection.Set<String>
getHttpMethodOmissions()
Return the set of HTTP method omissions this collection has.String[]
getHttpMethodOmissionsAsArray()
Returns the HttpMethodOmissions this collection has in an array of strings This is added to speed up processing while creating webresource permissionsSet<String>
getHttpMethods()
Return the enumeration of HTTP methods this collection has.String[]
getHttpMethodsAsArray()
Returns the HttpMethods this collection has in an array of strings This is added to speed up processing while creating webresource permissionsSet<String>
getUrlPatterns()
Return my urls patterns (String objects)void
print(StringBuilder toStringBuilder)
A formatted string of the state.void
removeHttpMethod(String httpMethod)
Removes the given HTTP method from the collection of http methods.void
removeHttpMethodOmission(String httpMethodOmission)
Removes the given HTTP method omission from the collection of http methods.void
removeUrlPattern(String urlPattern)
Remove the specified url pattern from the collection.void
setHttpMethodOmissions(Set<String> httpMethodOmissions)
Sets the set of HTTP method omissions this collection has.void
setHttpMethods(Set<String> httpMethods)
Sets the set of HTTP methods this collection has.void
setUrlPatterns(Set<String> urlPatterns)
Clean out the collection of URL pattern and replace it with the given Set of (String) url patterns.-
Methods inherited from class org.glassfish.deployment.common.Descriptor
addDescriptorExtension, addPrefixMapping, createUniqueFilenameAmongst, createUniqueNameAmongst, createUniqueNameAmongstNamedDescriptors, fillDocType, getDeploymentExtensions, getDescription, getDescriptorExtension, getDescriptorExtensions, 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 org.glassfish.deployment.common.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()
-
WebResourceCollectionImpl
public WebResourceCollectionImpl(WebResourceCollectionImpl other)
-
-
Method Detail
-
getUrlPatterns
public Set<String> getUrlPatterns()
Return my urls patterns (String objects)- Specified by:
getUrlPatterns
in interfaceWebResourceCollection
- Returns:
- the set of the url patterns.
-
addUrlPattern
public void addUrlPattern(String urlPattern)
Add a URL pattern to this collection.- Specified by:
addUrlPattern
in interfaceWebResourceCollection
- Parameters:
the
- url pattern to be added.
-
removeUrlPattern
public void removeUrlPattern(String urlPattern)
Remove the specified url pattern from the collection.- Parameters:
the
- url pattern to be removed.
-
setUrlPatterns
public void setUrlPatterns(Set<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 Set<String> getHttpMethods()
Return the enumeration of HTTP methods this collection has.- Specified by:
getHttpMethods
in interfaceWebResourceCollection
- Returns:
- the enumeration of HTTP methods.
-
getHttpMethodsAsArray
public 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 interfaceWebResourceCollection
- Returns:
- array of strings of HttpMethods
-
setHttpMethods
public void setHttpMethods(Set<String> httpMethods)
Sets the set of HTTP methods this collection has.- Parameters:
the
- set of HTTP methods.
-
addHttpMethod
public void addHttpMethod(String httpMethod)
Adds the given HTTP method to the collection of http methods this collection has.- Specified by:
addHttpMethod
in interfaceWebResourceCollection
- Parameters:
the
- HTTP method to be added.
-
removeHttpMethod
public void removeHttpMethod(String httpMethod)
Removes the given HTTP method from the collection of http methods.- Parameters:
the
- HTTP method to be removed.
-
getHttpMethodOmissions
public Set<String> getHttpMethodOmissions()
Return the set of HTTP method omissions this collection has.- Specified by:
getHttpMethodOmissions
in interfaceWebResourceCollection
- Returns:
- the set of HTTP method omissions.
-
getHttpMethodOmissionsAsArray
public 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 interfaceWebResourceCollection
- Returns:
- array of strings of HttpMethodOmissions
-
setHttpMethodOmissions
public void setHttpMethodOmissions(Set<String> httpMethodOmissions)
Sets the set of HTTP method omissions this collection has.- Parameters:
the
- set of HTTP method omissions.
-
addHttpMethodOmission
public void addHttpMethodOmission(String httpMethodOmission)
Adds the given HTTP method omission to the collection of http methods this collection has.- Specified by:
addHttpMethodOmission
in interfaceWebResourceCollection
- Parameters:
the
- HTTP method to be added.
-
removeHttpMethodOmission
public void removeHttpMethodOmission(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(StringBuilder toStringBuilder)
A formatted string of the state.- Overrides:
print
in classDescriptor
-
-