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

The following examples show how to use org.wso2.balana.attr.IntegerAttribute#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: MultiplyFunction.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Private helper that returns the type used 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.
 */
private static String getArgumentType(String functionName) {
    if (functionName.equals(NAME_INTEGER_MULTIPLY))
        return IntegerAttribute.identifier;
    else
        return DoubleAttribute.identifier;
}
 
Example 2
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 3
Source File: AddFunction.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Private helper that returns the type used 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.
 */
private static String getArgumentType(String functionName) {
	if (functionName.equals(NAME_INTEGER_ADD))
		return IntegerAttribute.identifier;
	else
		return DoubleAttribute.identifier;
}
 
Example 4
Source File: AbsFunction.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Private helper that returns the type used 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.
 */
private static String getArgumentType(String functionName) {
    if (functionName.equals(NAME_INTEGER_ABS))
        return IntegerAttribute.identifier;
    else
        return DoubleAttribute.identifier;
}
 
Example 5
Source File: NumericConvertFunction.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Private helper that returns the type used 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.
 */
private static String getArgumentType(String functionName) {
    if (functionName.equals(NAME_DOUBLE_TO_INTEGER))
        return DoubleAttribute.identifier;
    else
        return IntegerAttribute.identifier;
}
 
Example 6
Source File: NumericConvertFunction.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.
 */
private static String getReturnType(String functionName) {
    if (functionName.equals(NAME_DOUBLE_TO_INTEGER))
        return IntegerAttribute.identifier;
    else
        return DoubleAttribute.identifier;
}
 
Example 7
Source File: DivideFunction.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Private helper that returns the type used 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.
 */
private static String getArgumentType(String functionName) {
    if (functionName.equals(NAME_INTEGER_DIVIDE))
        return IntegerAttribute.identifier;
    else
        return DoubleAttribute.identifier;
}
 
Example 8
Source File: SubtractFunction.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Private helper that returns the type used 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.
 */
private static String getArgumentType(String functionName) {
    if (functionName.equals(NAME_INTEGER_SUBTRACT))
        return IntegerAttribute.identifier;
    else
        return DoubleAttribute.identifier;
}
 
Example 9
Source File: ModFunction.java    From balana with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new <code>ModFunction</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 ModFunction(String functionName) {
    super(NAME_INTEGER_MOD, 0, IntegerAttribute.identifier, false, 2,
            IntegerAttribute.identifier, false);

    if (!functionName.equals(NAME_INTEGER_MOD))
        throw new IllegalArgumentException("unknown mod function: " + functionName);
}