Class SecurityCollection
java.lang.Object
org.apache.tomcat.util.descriptor.web.XmlEncodingBase
org.apache.tomcat.util.descriptor.web.SecurityCollection
- All Implemented Interfaces:
- Serializable
Representation of a web resource collection for a web application's security
 constraint, as represented in a 
<web-resource-collection>
 element in the deployment descriptor.
 WARNING: It is assumed that instances of this class will be created and modified only within the context of a single thread, before the instance is made visible to the remainder of the application. After that, only read access is expected. Therefore, none of the read and write access within this class is synchronized.
- Author:
- Craig R. McClanahan
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionConstruct a new security collection instance with default values.SecurityCollection(String name, String description) Construct a new security collection instance with specified values.
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdd an HTTP request method to be explicitly part of this web resource collection.voidaddOmittedMethod(String method) Add an HTTP request method to the methods explicitly excluded from this web resource collection.voidaddPattern(String pattern) Add a URL pattern to be part of this web resource collection.voidaddPatternDecoded(String pattern) booleanfindMethod(String method) Check if the collection applies to the specified method.String[]String[]booleanfindPattern(String pattern) Is the specified pattern part of this web resource collection?String[]getName()booleanvoidremoveMethod(String method) Remove the specified HTTP request method from those that are part of this web resource collection.voidremoveOmittedMethod(String method) Remove the specified HTTP request method from those that are explicitly excluded from this web resource collection.voidremovePattern(String pattern) Remove the specified URL pattern from those that are part of this web resource collection.voidsetDescription(String description) Set the description of this web resource collection.voidsetFromDescriptor(boolean isFromDescriptor) Set if this constraint was defined in a deployment descriptor.voidSet the name of this web resource collectiontoString()Return a String representation of this security collection.Methods inherited from class org.apache.tomcat.util.descriptor.web.XmlEncodingBasegetCharset, setCharset
- 
Constructor Details- 
SecurityCollectionpublic SecurityCollection()Construct a new security collection instance with default values.
- 
SecurityCollectionConstruct a new security collection instance with specified values.- Parameters:
- name- Name of this security collection
- description- Description of this security collection
 
 
- 
- 
Method Details- 
getDescription- Returns:
- the description of this web resource collection.
 
- 
setDescriptionSet the description of this web resource collection.- Parameters:
- description- The new description
 
- 
getName- Returns:
- the name of this web resource collection.
 
- 
setNameSet the name of this web resource collection- Parameters:
- name- The new name
 
- 
isFromDescriptorpublic boolean isFromDescriptor()- Returns:
- if this constraint was defined in a deployment descriptor.
 
- 
setFromDescriptorpublic void setFromDescriptor(boolean isFromDescriptor) Set if this constraint was defined in a deployment descriptor.- Parameters:
- isFromDescriptor-- truewas declared in a descriptor
 
- 
addMethodAdd an HTTP request method to be explicitly part of this web resource collection.- Parameters:
- method- The method
 
- 
addOmittedMethodAdd an HTTP request method to the methods explicitly excluded from this web resource collection.- Parameters:
- method- The method
 
- 
addPatternAdd a URL pattern to be part of this web resource collection.- Parameters:
- pattern- The pattern
 
- 
addPatternDecoded
- 
findMethodCheck if the collection applies to the specified method.- Parameters:
- method- Request method to check
- Returns:
- trueif the specified HTTP request method is part of this web resource collection.
 
- 
findMethods- Returns:
- the set of HTTP request methods that are part of this web resource collection, or a zero-length array if no methods have been explicitly included.
 
- 
findOmittedMethods- Returns:
- the set of HTTP request methods that are explicitly excluded from this web resource collection, or a zero-length array if no request methods are excluded.
 
- 
findPatternIs the specified pattern part of this web resource collection?- Parameters:
- pattern- Pattern to be compared
- Returns:
- trueif the pattern is part of the collection
 
- 
findPatterns- Returns:
- the set of URL patterns that are part of this web resource collection. If none have been specified, a zero-length array is returned.
 
- 
removeMethodRemove the specified HTTP request method from those that are part of this web resource collection.- Parameters:
- method- Request method to be removed
 
- 
removeOmittedMethodRemove the specified HTTP request method from those that are explicitly excluded from this web resource collection.- Parameters:
- method- Request method to be removed
 
- 
removePatternRemove the specified URL pattern from those that are part of this web resource collection.- Parameters:
- pattern- Pattern to be removed
 
- 
toStringReturn a String representation of this security collection.
 
-