org.objectweb.jonas_web.deployment.api
Class PatternEntry

java.lang.Object
  extended by org.objectweb.jonas_web.deployment.api.PatternEntry

public class PatternEntry
extends java.lang.Object

Defines a PatternEntry object for JACC URLPattern handle

Author:
Florent Benoit

Constructor Summary
PatternEntry(java.lang.String pattern)
          Constructor
 
Method Summary
 void addExcludedMethods(java.lang.String[] methods, java.lang.String transportGuarantee)
          Add Excluded Http methods
 void addMethods(java.lang.String[] methods, java.lang.String transportGuarantee, boolean isExcluded)
          Add Http methods (Excluded or Unchecked)
 void addMethodsOnRole(java.lang.String[] methods, java.lang.String role, java.lang.String transportGuarantee)
          Add pattern information for a given role
 void addMethodsOnRoles(java.lang.String[] methods, java.lang.String[] roles, java.lang.String transportGuarantee)
          Add pattern information for given roles
 void addQualifiedPattern(Pattern otherPattern)
          Add to this pattern a qualified pattern
 void addUncheckedMethods(java.lang.String[] methods, java.lang.String transportGuarantee)
          Add Unchecked Http methods
 java.security.PermissionCollection getExcludedPermissions()
          Gets the excluded permissions for this pattern
 java.lang.String getQualifiedPattern()
          Gets the qualified form of the pattern
 java.util.Map getRolesPermissionsMap()
          Gets the permissions for each role.
 java.security.PermissionCollection getUncheckedPermissions()
          Gets the unchecked permissions for this pattern
 boolean isIrrelevant()
          Gets the state of the pattern.
 boolean isUncheckedLastEntry()
          Gets the boolean value of the flag which indicate that this entry will be added at the end as unchecked permission
 void setUncheckedLastEntry()
          Set the flag which indicate that this entry will be added at the end as unchecked permission
 java.lang.String toString()
          String representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PatternEntry

public PatternEntry(java.lang.String pattern)
Constructor

Parameters:
pattern - used by this PatternEntry object
Method Detail

addMethods

public void addMethods(java.lang.String[] methods,
                       java.lang.String transportGuarantee,
                       boolean isExcluded)
Add Http methods (Excluded or Unchecked)

Parameters:
methods - array of methods to add
transportGuarantee - Transport Guarantee for these methods
isExcluded - if true add methods as excluded else as unchecked

addExcludedMethods

public void addExcludedMethods(java.lang.String[] methods,
                               java.lang.String transportGuarantee)
Add Excluded Http methods

Parameters:
methods - array of methods to add
transportGuarantee - Transport Guarantee for these methods

addUncheckedMethods

public void addUncheckedMethods(java.lang.String[] methods,
                                java.lang.String transportGuarantee)
Add Unchecked Http methods

Parameters:
methods - array of methods to add
transportGuarantee - Transport Guarantee for these methods

addMethodsOnRoles

public void addMethodsOnRoles(java.lang.String[] methods,
                              java.lang.String[] roles,
                              java.lang.String transportGuarantee)
Add pattern information for given roles

Parameters:
methods - methods to add to the given role
roles - roles which have the given methods
transportGuarantee - Transport Guarantee for these methods

addMethodsOnRole

public void addMethodsOnRole(java.lang.String[] methods,
                             java.lang.String role,
                             java.lang.String transportGuarantee)
Add pattern information for a given role

Parameters:
methods - methods to add to the given role
role - role which have the given methods
transportGuarantee - Transport Guarantee for these methods

setUncheckedLastEntry

public void setUncheckedLastEntry()
Set the flag which indicate that this entry will be added at the end as unchecked permission


isUncheckedLastEntry

public boolean isUncheckedLastEntry()
Gets the boolean value of the flag which indicate that this entry will be added at the end as unchecked permission

Returns:
true if this is the pattern to add at the end

addQualifiedPattern

public void addQualifiedPattern(Pattern otherPattern)
Add to this pattern a qualified pattern

Parameters:
otherPattern - pattern to add for the qualified pattern
See Also:
3.1.3.1 (Qualifying pattern)

getRolesPermissionsMap

public java.util.Map getRolesPermissionsMap()
Gets the permissions for each role. Map between role and permissions

Returns:
the Map witth key = role, value = permissions

getExcludedPermissions

public java.security.PermissionCollection getExcludedPermissions()
Gets the excluded permissions for this pattern

Returns:
the excluded permissions for this pattern

getUncheckedPermissions

public java.security.PermissionCollection getUncheckedPermissions()
Gets the unchecked permissions for this pattern

Returns:
the unchecked permissions for this pattern

isIrrelevant

public boolean isIrrelevant()
Gets the state of the pattern. Irrelevant or not during the qualifying phase

Returns:
true if the pattern is irrelevant, false otherwise

getQualifiedPattern

public java.lang.String getQualifiedPattern()
Gets the qualified form of the pattern

Returns:
qualified pattern

toString

public java.lang.String toString()
String representation

Overrides:
toString in class java.lang.Object
Returns:
string representation of the pattern