Methods Summary |
---|
public void | addMethod(java.lang.String method)Add an HTTP request method to be part of this web resource collection.
if (method == null)
return;
String results[] = new String[methods.length + 1];
for (int i = 0; i < methods.length; i++)
results[i] = methods[i];
results[methods.length] = method;
methods = results;
|
public void | addPattern(java.lang.String pattern)Add a URL pattern to be part of this web resource collection.
if (pattern == null)
return;
pattern = RequestUtil.URLDecode(pattern);
String results[] = new String[patterns.length + 1];
for (int i = 0; i < patterns.length; i++)
results[i] = patterns[i];
results[patterns.length] = pattern;
patterns = results;
|
public boolean | findMethod(java.lang.String method)Return true if the specified HTTP request method is
part of this web resource collection.
if (methods.length == 0)
return (true);
for (int i = 0; i < methods.length; i++) {
if (methods[i].equals(method))
return (true);
}
return (false);
|
public 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 all request methods
are included.
return (methods);
|
public boolean | findPattern(java.lang.String pattern)Is the specified pattern part of this web resource collection?
for (int i = 0; i < patterns.length; i++) {
if (patterns[i].equals(pattern))
return (true);
}
return (false);
|
public java.lang.String[] | findPatterns()Return the set of URL patterns that are part of this web resource
collection. If none have been specified, a zero-length array is
returned.
return (patterns);
|
public java.lang.String | getDescription()Return the description of this web resource collection.
// ------------------------------------------------------------- Properties
return (this.description);
|
public java.lang.String | getName()Return the name of this web resource collection.
return (this.name);
|
public void | removeMethod(java.lang.String method)Remove the specified HTTP request method from those that are part
of this web resource collection.
if (method == null)
return;
int n = -1;
for (int i = 0; i < methods.length; i++) {
if (methods[i].equals(method)) {
n = i;
break;
}
}
if (n >= 0) {
int j = 0;
String results[] = new String[methods.length - 1];
for (int i = 0; i < methods.length; i++) {
if (i != n)
results[j++] = methods[i];
}
methods = results;
}
|
public void | removePattern(java.lang.String pattern)Remove the specified URL pattern from those that are part of this
web resource collection.
if (pattern == null)
return;
int n = -1;
for (int i = 0; i < patterns.length; i++) {
if (patterns[i].equals(pattern)) {
n = i;
break;
}
}
if (n >= 0) {
int j = 0;
String results[] = new String[patterns.length - 1];
for (int i = 0; i < patterns.length; i++) {
if (i != n)
results[j++] = patterns[i];
}
patterns = results;
}
|
public void | setDescription(java.lang.String description)Set the description of this web resource collection.
this.description = description;
|
public void | setName(java.lang.String name)Set the name of this web resource collection
this.name = name;
|
public java.lang.String | toString()Return a String representation of this security collection.
StringBuffer sb = new StringBuffer("SecurityCollection[");
sb.append(name);
if (description != null) {
sb.append(", ");
sb.append(description);
}
sb.append("]");
return (sb.toString());
|