|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
The ResourcePattern interface represents a set of Resources
using a pattern that matches Resource identifiers.
| Method Summary | |
FieldInfo[] |
getFieldInfo()
Get information about ResourcePattern fields. |
FieldInfo |
getFieldInfo(String fieldName)
Get information about a specific ResourcePattern field. |
Object |
getFieldValue(String fieldName)
Get the value associated with a ResourcePattern field. |
boolean |
getIgnoreCase()
Get the flag indicating whether pattern matching is performed in a case sensitive or a case-insensitive way. |
String |
getPattern()
Get the general Resource Identifier pattern. |
boolean |
match(ResourceRequest resourceReq)
Determine if a ResourceRequest matches this ResourcePattern. |
BigDecimal |
score()
Get the specificality score. |
void |
setFieldValue(String fieldName,
Object fieldValue)
Set the value associated with a ResourcePattern field. |
void |
setIgnoreCase(boolean ignoreCase)
Set the flag that enables/disables ignoring the case of the pattern. |
void |
setPattern(String pattern)
Set the Resource Identifier pattern. |
| Methods inherited from interface java.lang.Comparable |
compareTo |
| Method Detail |
public String getPattern()
public void setPattern(String pattern)
throws ResourcePatternException
pattern - a string that represents a pattern of Resource identifiers.
ResourcePatternException - if the overall resource identifier
pattern is invalid.public void setIgnoreCase(boolean ignoreCase)
ignoreCase - if true, ignore the case of the pattern. If false, then
matches the pattern case-sensitively.public boolean getIgnoreCase()
public FieldInfo[] getFieldInfo()
public FieldInfo getFieldInfo(String fieldName)
fieldName - the name of the Field.
public Object getFieldValue(String fieldName)
fieldName - the name of the Field.
public void setFieldValue(String fieldName,
Object fieldValue)
throws ResourcePatternException
fieldName - the name of the Field.fieldValue - the value to be be assigned to the Field.
ResourcePatternException - if the specified field is unknown
or the field value is invalid.public boolean match(ResourceRequest resourceReq)
resourceReq - the ResourceRequest to be checked against this
ResourcePattern.
public BigDecimal score()
This method calculates how specific a ResourcePattern is. Because, the ResourcePattern is aware of the various FieldValuePatterns that compose itself it can determine how specific a pattern is. The score is calculated using an algorithm that is implementation specific.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||