public class SecurityCollection
extends java.lang.Object
implements java.io.Serializable
<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.
Constructor and Description |
---|
SecurityCollection()
Construct a new security collection instance with default values.
|
SecurityCollection(java.lang.String name,
java.lang.String description)
Construct a new security collection instance with specified values.
|
Modifier and Type | Method and Description |
---|---|
void |
addMethod(java.lang.String method)
Add an HTTP request method to be explicitly part of this web resource
collection.
|
void |
addOmittedMethod(java.lang.String method)
Add an HTTP request method to the methods explicitly excluded from this
web resource collection.
|
void |
addPattern(java.lang.String pattern)
Add a URL pattern to be part of this web resource collection.
|
void |
addPatternDecoded(java.lang.String pattern) |
boolean |
findMethod(java.lang.String method)
Return
true if the specified HTTP request method is
part of this web resource collection. |
java.lang.String[] |
findMethods()
Return 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.
|
java.lang.String[] |
findOmittedMethods()
Return 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.
|
boolean |
findPattern(java.lang.String pattern)
Is the specified pattern part of this web resource collection?
|
java.lang.String[] |
findPatterns()
Return the set of URL patterns that are part of this web resource
collection.
|
java.lang.String |
getDescription()
Return the description of this web resource collection.
|
java.lang.String |
getEncoding()
Obtain the encoding of the XML source that was used to populated this
object.
|
java.lang.String |
getName()
Return the name of this web resource collection.
|
boolean |
isFromDescriptor()
Return if this constraint was defined in a deployment descriptor.
|
void |
removeMethod(java.lang.String method)
Remove the specified HTTP request method from those that are part
of this web resource collection.
|
void |
removeOmittedMethod(java.lang.String method)
Remove the specified HTTP request method from those that are explicitly
excluded from this web resource collection.
|
void |
removePattern(java.lang.String pattern)
Remove the specified URL pattern from those that are part of this
web resource collection.
|
void |
setDescription(java.lang.String description)
Set the description of this web resource collection.
|
void |
setEncoding(java.lang.String encoding) |
void |
setFromDescriptor(boolean isFromDescriptor)
Set if this constraint was defined in a deployment descriptor.
|
void |
setName(java.lang.String name)
Set the name of this web resource collection
|
java.lang.String |
toString()
Return a String representation of this security collection.
|
public SecurityCollection()
public SecurityCollection(java.lang.String name, java.lang.String description)
name
- Name of this security collectiondescription
- Description of this security collectionpublic void setEncoding(java.lang.String encoding)
public java.lang.String getEncoding()
UTF-8
if the encoding could not be determinedpublic java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- The new descriptionpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- The new namepublic boolean isFromDescriptor()
public void setFromDescriptor(boolean isFromDescriptor)
public void addMethod(java.lang.String method)
public void addOmittedMethod(java.lang.String method)
public void addPattern(java.lang.String pattern)
public void addPatternDecoded(java.lang.String pattern)
public boolean findMethod(java.lang.String method)
true
if the specified HTTP request method is
part of this web resource collection.method
- Request method to checkpublic java.lang.String[] findMethods()
public java.lang.String[] findOmittedMethods()
public boolean findPattern(java.lang.String pattern)
pattern
- Pattern to be comparedpublic java.lang.String[] findPatterns()
public void removeMethod(java.lang.String method)
method
- Request method to be removedpublic void removeOmittedMethod(java.lang.String method)
method
- Request method to be removedpublic void removePattern(java.lang.String pattern)
pattern
- Pattern to be removedpublic java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2000-2018 Apache Software Foundation. All Rights Reserved.