Java Code Examples for org.wso2.balana.attr.BooleanAttribute#identifier()

The following examples show how to use org.wso2.balana.attr.BooleanAttribute#identifier() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XPathFunction.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Private helper that returns the return type for the given standard function. Note that this
 * doesn't check on the return value since the method always is called after getId, so we assume
 * that the function is present.
 *
 * @param functionName function name
 * @return identifier of the Data type
 */
private static String getReturnType(String functionName) {
    
    if (functionName.equals(NAME_XPATH_NODE_COUNT)){
        return IntegerAttribute.identifier;
    } else {
        return BooleanAttribute.identifier;
    }
}
 
Example 2
Source File: EvalPermissionTreeFunction.java    From carbon-identity-framework with Apache License 2.0 4 votes vote down vote up
public EvalPermissionTreeFunction() {

        super(SUBJECT_HAS_PERMISSION, ID_EVAL_PERMISSION_TREE, StringAttribute.identifier, false, 2, 2,
                BooleanAttribute.identifier, false);
    }
 
Example 3
Source File: TimeInRangeFunction.java    From balana with Apache License 2.0 4 votes vote down vote up
/**
 * Default constructor.
 */
public TimeInRangeFunction() {
    super(NAME, 0, TimeAttribute.identifier, false, 3, BooleanAttribute.identifier, false);
}
 
Example 4
Source File: IPInRangeFunction.java    From balana with Apache License 2.0 4 votes vote down vote up
/**
 * Default constructor.
 */
public IPInRangeFunction() {
    super(NAME, 0, IPAddressAttribute.identifier, false, 3, BooleanAttribute.identifier, false);
}
 
Example 5
Source File: NotFunction.java    From balana with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new <code>NotFunction</code> object.
 * 
 * @param functionName the standard XACML name of the function to be handled by this object,
 *            including the full namespace
 * 
 * @throws IllegalArgumentException if the function is unknown
 */
public NotFunction(String functionName) {
    super(NAME_NOT, 0, BooleanAttribute.identifier, false, 1, BooleanAttribute.identifier,
            false);

    if (!functionName.equals(NAME_NOT))
        throw new IllegalArgumentException("unknown not function: " + functionName);
}
 
Example 6
Source File: NOfFunction.java    From balana with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new <code>NOfFunction</code> object.
 * 
 * @param functionName the standard XACML name of the function to be handled by this object,
 *            including the full namespace
 * 
 * @throws IllegalArgumentException if the function is unknown
 */
public NOfFunction(String functionName) {
    super(NAME_N_OF, 0, BooleanAttribute.identifier, false);

    if (!functionName.equals(NAME_N_OF))
        throw new IllegalArgumentException("unknown nOf function: " + functionName);
}
 
Example 7
Source File: ComparisonFunction.java    From balana with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new <code>ComparisonFunction</code> object.
 * 
 * @param functionName the standard XACML name of the function to be handled by this object,
 *            including the full namespace
 * 
 * @throws IllegalArgumentException if the function isn't known
 */
public ComparisonFunction(String functionName) {
	super(functionName, getId(functionName), getArgumentType(functionName), false, 2,
			BooleanAttribute.identifier, false);
}
 
Example 8
Source File: EqualFunction.java    From balana with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new <code>EqualFunction</code> object.
 * 
 * @param functionName the standard XACML name of the function to be handled by this object,
 *            including the full namespace
 * @param argumentType the standard XACML name for the type of the arguments, inlcuding the full
 *            namespace
 */
public EqualFunction(String functionName, String argumentType) {
    super(functionName, getId(functionName), argumentType, false, 2, BooleanAttribute.identifier, false);
}
 
Example 9
Source File: ConditionSetFunction.java    From balana with Apache License 2.0 2 votes vote down vote up
/**
 * Constructor that is used to create one of the condition standard set functions. The name
 * supplied must be one of the standard XACML functions supported by this class, including the
 * full namespace, otherwise an exception is thrown. Look in <code>SetFunction</code> for
 * details about the supported names.
 * 
 * @param functionName the name of the function to create
 * 
 * @throws IllegalArgumentException if the function is unknown
 */
public ConditionSetFunction(String functionName) {
	super(functionName, getId(functionName), getArgumentType(functionName),
			BooleanAttribute.identifier, false);
}
 
Example 10
Source File: ConditionSetFunction.java    From balana with Apache License 2.0 2 votes vote down vote up
/**
 * Constructor that is used to create instances of condition set functions for new
 * (non-standard) datatypes. This is equivalent to using the <code>getInstance</code> methods in
 * <code>SetFunction</code> and is generally only used by the run-time configuration code.
 * 
 * @param functionName the name of the new function
 * @param datatype the full identifier for the supported datatype
 * @param functionType which kind of Set function, based on the <code>NAME_BASE_*</code> fields
 */
public ConditionSetFunction(String functionName, String datatype, String functionType) {
	super(functionName, getId(functionName), datatype, BooleanAttribute.identifier, false);
}
 
Example 11
Source File: MatchFunction.java    From balana with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new <code>MatchFunction</code> based on the given name.
 * 
 * @param functionName the name of the standard match function, including the complete namespace
 * 
 * @throws IllegalArgumentException if the function is unknown
 */
public MatchFunction(String functionName) {
    super(functionName, getId(functionName), getArgumentTypes(functionName), bagParams,
            BooleanAttribute.identifier, false);
}
 
Example 12
Source File: LogicalFunction.java    From balana with Apache License 2.0 2 votes vote down vote up
/**
 * Creates a new <code>LogicalFunction</code> object.
 * 
 * @param functionName the standard XACML name of the function to be handled by this object,
 *            including the full namespace
 * 
 * @throws IllegalArgumentException if the functionName is unknown
 */
public LogicalFunction(String functionName) {
    super(functionName, getId(functionName), BooleanAttribute.identifier, false, -1,
            BooleanAttribute.identifier, false);
}
 
Example 13
Source File: BagFunction.java    From balana with Apache License 2.0 2 votes vote down vote up
/**
 * Protected constuctor used by the general and condition subclasses to create a boolean
 * function with parameters of different datatypes. If you need to create a new
 * <code>BagFunction</code> instance you should either use one of the <code>getInstance</code>
 * methods or construct one of the sub-classes directly.
 * 
 * @param functionName the identitifer for the function
 * @param functionId an optional, internal numeric identifier
 * @param paramTypes the datatype of each parameter
 */
protected BagFunction(String functionName, int functionId, String[] paramTypes) {
    super(functionName, functionId, paramTypes, bagParams, BooleanAttribute.identifier, false);
}