org.glite.authz.common.fqan
Class FQAN

java.lang.Object
  extended by org.glite.authz.common.fqan.FQAN

public class FQAN
extends java.lang.Object

Represents an FQAN.


Field Summary
static java.lang.String CAPABILITY
          Capability component identifier, "Capability" .
static java.lang.String NULL
          The value "NULL", used in the canonical form to represent the absence of a Role or Capability.
static java.lang.String ROLE
          Role component identifier, "Role" .
static java.lang.String WILDCARD
          The wildcard * used for pattern matching
 
Constructor Summary
FQAN(java.lang.String fqanGroupName)
          Constructor with a FQAN group name, but without Role (NULL).
FQAN(java.lang.String fqanGroupName, java.lang.String fqanRole)
          Constructor with a FQAN group name and a Role value.
FQAN(java.lang.String fqanGroupName, java.lang.String fqanRole, java.lang.String fqanCapability)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 java.lang.String getCapability()
          Gets the Capability value of the FQAN i.e /Capability=value.
 java.lang.String getGroupName()
          Gets the group name component of the FQAN.
 java.lang.String getRole()
          Gets the Role value of the FQAN i.e.
 int hashCode()
          
 boolean matches(FQAN regexpFQAN)
          Checks if this FQAN matches the given regular expression FQAN
 boolean matches(java.lang.String regexp)
          Checks whether this FQAN matches the given FQAN regular expression.
protected  boolean matchesGroupName(FQAN regexpFQAN)
          Checks if the group name of this FQAN matches a group name regular expression.
protected  boolean matchesRole(FQAN regexpFQAN)
          Checks if the role of this FQAN matches a role regular expression.
static FQAN parseFQAN(java.lang.String fqan)
          Parses an FQAN, in string form, in to an FQAN.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ROLE

public static final java.lang.String ROLE
Role component identifier, "Role" .

See Also:
Constant Field Values

CAPABILITY

public static final java.lang.String CAPABILITY
Capability component identifier, "Capability" .

See Also:
Constant Field Values

NULL

public static final java.lang.String NULL
The value "NULL", used in the canonical form to represent the absence of a Role or Capability.

See Also:
Constant Field Values

WILDCARD

public static final java.lang.String WILDCARD
The wildcard * used for pattern matching

See Also:
Constant Field Values
Constructor Detail

FQAN

public FQAN(java.lang.String fqanGroupName,
            java.lang.String fqanRole,
            java.lang.String fqanCapability)
Constructor.

Parameters:
fqanGroupName - group name of the FQAN, may not be null
fqanRole - role value of the FQAN, may be null
fqanCapability - capability value of the FQAN, may be null

FQAN

public FQAN(java.lang.String fqanGroupName,
            java.lang.String fqanRole)
Constructor with a FQAN group name and a Role value.

Parameters:
fqanGroupName - group name of the FQAN, may not be null
fqanRole - role value of the FQAN, may be null

FQAN

public FQAN(java.lang.String fqanGroupName)
Constructor with a FQAN group name, but without Role (NULL).

Parameters:
fqanGroupName - group name of the FQAN, may not be null
Method Detail

getGroupName

public java.lang.String getGroupName()
Gets the group name component of the FQAN.

Returns:
group name component of the FQAN

getRole

public java.lang.String getRole()
Gets the Role value of the FQAN i.e. /Role=value.

Returns:
Role component of the FQAN

getCapability

public java.lang.String getCapability()
Gets the Capability value of the FQAN i.e /Capability=value.

Returns:
Capability component of the FQAN

parseFQAN

public static FQAN parseFQAN(java.lang.String fqan)
                      throws java.text.ParseException
Parses an FQAN, in string form, in to an FQAN.

Parameters:
fqan - FQAN in string form
Returns:
FQAN object
Throws:
java.text.ParseException - thrown if the FQAN string is invalid

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)

Overrides:
equals in class java.lang.Object

matches

public boolean matches(java.lang.String regexp)
                throws java.text.ParseException
Checks whether this FQAN matches the given FQAN regular expression.

Parameters:
regexp - the FQAN regular expression
Returns:
true if the FQAN matches the regular expression.
Throws:
java.text.ParseException - thrown if the given expression is not a valid FQAN regular expression
See Also:
FQAN matching specification

matches

public boolean matches(FQAN regexpFQAN)
                throws java.text.ParseException
Checks if this FQAN matches the given regular expression FQAN

Parameters:
regexpFQAN - The regular expression FQAN
Returns:
true if the FQAN matches the regular expression.
Throws:
java.text.ParseException - thrown if the given expression is not a valid FQAN regular expression

matchesGroupName

protected boolean matchesGroupName(FQAN regexpFQAN)
                            throws java.text.ParseException
Checks if the group name of this FQAN matches a group name regular expression. In the event that the expression does not contain the wildcard '*' character, exact equality matching is performed

Parameters:
regexpFQAN - the group name regular expression
Returns:
true if the given group name matches the given regular expression
Throws:
java.text.ParseException - thrown if the regular expression is not valid

matchesRole

protected boolean matchesRole(FQAN regexpFQAN)
                       throws java.text.ParseException
Checks if the role of this FQAN matches a role regular expression. In the event that the expression does not contain the wildcard '*' character, exact equality matching is performed

Parameters:
regexpFQAN - the role regular expression
Returns:
true if the given role matches the given regular expression
Throws:
java.text.ParseException - thrown if the regular expression is not valid


Copyright © 2008-2012 EMI - European Middleware Initiative. All Rights Reserved.