nbi.xmlsec.xacml.profile.rbac.builder
Class PermissionMatchBuilder

java.lang.Object
  extended bynbi.xmlsec.xacml.builder.TargetMatchBuilder
      extended bynbi.xmlsec.xacml.profile.rbac.builder.PermissionMatchBuilder

public class PermissionMatchBuilder
extends TargetMatchBuilder

This class serves to create specialised TargetMatches for Permissions from target scheme descriptions(datatype-matchfunc[value]). The following functions are supported:

  • string-equal
  • anyuri-equal
  • x500Name-equal
  • string-match
  • x500Name-match
  • Since:
    Version:
    $Revision: 1.2 $
    Author:
    Lutz Suhrbier

    Field Summary
     
    Fields inherited from class nbi.xmlsec.xacml.builder.TargetMatchBuilder
    attribute, eval, function, type
     
    Constructor Summary
    PermissionMatchBuilder(int type)
              Creates a PermissionMatchBuilder based on the type target match (SubjectMatch, ResourceMatch, or ActionMatch) to build.
     
    Method Summary
     AttributeValue createMatchValue()
              Create the appropriate attribute match value for the evaluation function.
     String getDataTypeId(String dataType)
              Retrieves the SunXACML Attribute identifier for a given datatype: The following datatypes are supported: string anyuri x500Name
     String getFunctionId(String dataType, String function)
              Retrieves the matching SunXACML function id for Permissions.
     void setAttribute(String obj)
              Parses and sets the TargetMatchBuilder attribute from a target syntax scheme description.
     
    Methods inherited from class nbi.xmlsec.xacml.builder.TargetMatchBuilder
    getInstance, setAttribute, setMatchEvaluatable, setMatchEvaluatable, setMatchFunction, setMatchFunction
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Constructor Detail

    PermissionMatchBuilder

    public PermissionMatchBuilder(int type)
    Creates a PermissionMatchBuilder based on the type target match (SubjectMatch, ResourceMatch, or ActionMatch) to build.

    Parameters:
    type - type of the target match.
    Method Detail

    getFunctionId

    public String getFunctionId(String dataType,
                                String function)
    Retrieves the matching SunXACML function id for Permissions. Currently, the following functions are supported:
  • string-equal
  • anyuri-equal
  • x500Name-equal
  • string-match
  • x500Name-match
  • Parameters:
    dataType - datatype of the match function.
    function - name of the match function.
    Returns:
    The SunXACML identifier of the match function.

    getDataTypeId

    public String getDataTypeId(String dataType)
    Retrieves the SunXACML Attribute identifier for a given datatype: The following datatypes are supported:
  • string
  • anyuri
  • x500Name
  • Parameters:
    dataType - data type to search for.
    Returns:
    The corresponding XACML-Attribute-identfier of the datatype.

    setAttribute

    public void setAttribute(String obj)
                      throws UnknownIdentifierException,
                             FunctionTypeException
    Parses and sets the TargetMatchBuilder attribute from a target syntax scheme description. The syntax scheme description must match the following scheme: datatype-matchfunc[value].

    Parameters:
    obj - target syntax scheme description
    Throws:
    UnknownIdentifierException - Unknown identifier type used
    FunctionTypeException - Unknown function type used

    createMatchValue

    public AttributeValue createMatchValue()
    Create the appropriate attribute match value for the evaluation function.

    Specified by:
    createMatchValue in class TargetMatchBuilder
    Returns:
    The created attribute value.
    See Also:
    TargetMatchBuilder.createMatchValue()


    Copyright © 2006 Lutz Suhrbier, Freie Universitšt Berlin. All Rights Reserved.