org.glite.voms.contact
Class PathNamingScheme

java.lang.Object
  extended by org.glite.voms.contact.PathNamingScheme

public class PathNamingScheme
extends java.lang.Object

This class provides utility methods that are used for parsing, matching voms FQANs (Fully Qualified Attribute Names).


Field Summary
static java.util.regex.Pattern capabilityPattern
           
static java.lang.String capabilitySyntax
           
static java.util.regex.Pattern containerPattern
           
static java.lang.String containerSyntax
           
static java.util.regex.Pattern groupPattern
           
static java.lang.String groupSyntax
           
static org.apache.log4j.Logger log
           
static java.util.regex.Pattern qualifiedRolePattern
           
static java.lang.String qualifiedRoleSyntax
           
static java.util.regex.Pattern rolePattern
           
static java.lang.String roleSyntax
           
 
Constructor Summary
PathNamingScheme()
           
 
Method Summary
static void checkGroup(java.lang.String groupName)
          This methods checks that the string passed as argument complies with the syntax used by voms to identify groups.
static void checkRole(java.lang.String roleName)
          This methods checks that the string passed as argument complies with the syntax used by voms to identify roles.
static void checkSyntax(java.lang.String containerName)
          This methods checks that the string passed as argument complies with the voms FQAN syntax.
static java.lang.String getGroupName(java.lang.String containerName)
          This method extracts group name information from the FQAN passed as argument.
static java.lang.String getRoleName(java.lang.String containerName)
          This method extracts the role name information from the FQAN passed as argument.
static boolean isGroup(java.lang.String groupName)
          This methods checks that the FQAN passed as argument identifies a voms group.
static boolean isQualifiedRole(java.lang.String roleName)
          This methods checks that the FQAN passed as argument identifies a qualified voms role, i.e., a role defined in the context of a voms group.
static boolean isRole(java.lang.String roleName)
          This methods checks that the FQAN passed as argument identifies a voms role.
static java.lang.String toOldQualifiedRoleSyntax(java.lang.String qualifiedRole)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

public static final org.apache.log4j.Logger log

containerSyntax

public static final java.lang.String containerSyntax
See Also:
Constant Field Values

groupSyntax

public static final java.lang.String groupSyntax
See Also:
Constant Field Values

roleSyntax

public static final java.lang.String roleSyntax
See Also:
Constant Field Values

qualifiedRoleSyntax

public static final java.lang.String qualifiedRoleSyntax
See Also:
Constant Field Values

capabilitySyntax

public static final java.lang.String capabilitySyntax
See Also:
Constant Field Values

containerPattern

public static final java.util.regex.Pattern containerPattern

groupPattern

public static final java.util.regex.Pattern groupPattern

rolePattern

public static final java.util.regex.Pattern rolePattern

qualifiedRolePattern

public static final java.util.regex.Pattern qualifiedRolePattern

capabilityPattern

public static final java.util.regex.Pattern capabilityPattern
Constructor Detail

PathNamingScheme

public PathNamingScheme()
Method Detail

checkSyntax

public static void checkSyntax(java.lang.String containerName)
This methods checks that the string passed as argument complies with the voms FQAN syntax.

Parameters:
containerName - the string that must be checked for compatibility with FQAN syntax.
Throws:
VOMSSyntaxException - If there's an error in the FQAN syntax.

checkGroup

public static void checkGroup(java.lang.String groupName)
This methods checks that the string passed as argument complies with the syntax used by voms to identify groups.

Parameters:
groupName - the string that has to be checked.
Throws:
VOMSSyntaxException - If the string passed as argument doens not comply with the voms sytax.

checkRole

public static void checkRole(java.lang.String roleName)
This methods checks that the string passed as argument complies with the syntax used by voms to identify roles.

Parameters:
roleName -
Throws:
VOMSSyntaxException - If the string passed as argument doens not comply with the voms sytax.

isGroup

public static boolean isGroup(java.lang.String groupName)
This methods checks that the FQAN passed as argument identifies a voms group.

Parameters:
groupName - the string to check.
Returns:
  • true, if the string passed as argument identifies a voms group.
  • false, otherwise.

isRole

public static boolean isRole(java.lang.String roleName)
This methods checks that the FQAN passed as argument identifies a voms role.

Parameters:
roleName - the string to check.
Returns:
  • true, if the string passed as argument identifies a voms role.
  • false, otherwise.

isQualifiedRole

public static boolean isQualifiedRole(java.lang.String roleName)
This methods checks that the FQAN passed as argument identifies a qualified voms role, i.e., a role defined in the context of a voms group.

Parameters:
roleName - the string to check.
Returns:
  • true, if the string passed as argument identifies a qualified voms role.
  • false, otherwise.

getRoleName

public static java.lang.String getRoleName(java.lang.String containerName)
This method extracts the role name information from the FQAN passed as argument.

Parameters:
containerName - the FQAN
Returns:
  • A string containing the role name, if found
  • null, if no role information is contained in the FQAN passed as argument

getGroupName

public static java.lang.String getGroupName(java.lang.String containerName)
This method extracts group name information from the FQAN passed as argument.

Parameters:
containerName - the FQAN
Returns:
  • A string containing the group name, if found
  • null, if no group information is contained in the FQAN passed as argument

toOldQualifiedRoleSyntax

public static java.lang.String toOldQualifiedRoleSyntax(java.lang.String qualifiedRole)