Java Code Examples for org.wso2.balana.XACMLConstants#XACML_VERSION_2_0

The following examples show how to use org.wso2.balana.XACMLConstants#XACML_VERSION_2_0 . 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: PolicyAttributeBuilder.java    From carbon-identity-framework with Apache License 2.0 5 votes vote down vote up
/**
 * @param policy policy as a String
 */
public PolicyAttributeBuilder(String policy) {
    this.policy = policy;
    String version = EntitlementUtil.getPolicyVersion(policy);
    if (XACMLConstants.XACML_1_0_IDENTIFIER.equals(version)) {
        this.version = XACMLConstants.XACML_VERSION_1_0;
    } else if (XACMLConstants.XACML_2_0_IDENTIFIER.equals(version)) {
        this.version = XACMLConstants.XACML_VERSION_2_0;
    } else {
        this.version = XACMLConstants.XACML_VERSION_3_0;
    }
}
 
Example 2
Source File: PolicyAttributeBuilder.java    From carbon-identity with Apache License 2.0 5 votes vote down vote up
/**
 * @param policy policy as a String
 */
public PolicyAttributeBuilder(String policy) {
    this.policy = policy;
    String version = EntitlementUtil.getPolicyVersion(policy);
    if (XACMLConstants.XACML_1_0_IDENTIFIER.equals(version)) {
        this.version = XACMLConstants.XACML_VERSION_1_0;
    } else if (XACMLConstants.XACML_2_0_IDENTIFIER.equals(version)) {
        this.version = XACMLConstants.XACML_VERSION_2_0;
    } else {
        this.version = XACMLConstants.XACML_VERSION_3_0;
    }
}
 
Example 3
Source File: RequestCtx.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Constructor that creates a <code>RequestCtx</code> from components.
 *
 * @param attributesSet
 * @param documentRoot the root node of the DOM tree for this request
 * @param resourceContent a text-encoded version of the content, suitable for including in the
 *            RequestType, including the root <code>RequestContent</code> node
 *
 * @throws IllegalArgumentException if the inputs are not well formed
 */
public RequestCtx(Set<Attributes> attributesSet, Node documentRoot, Set<Subject> subjects,
                  Set<Attribute> resource, Set<Attribute> action,  Set<Attribute> environment,
                  String resourceContent) throws IllegalArgumentException {

    this.attributesSet = attributesSet;
    this.documentRoot = documentRoot;
    this.subjects = subjects;
    this.resource = resource;
    this.action = action;
    this.environment = environment;
    this.resourceContent = resourceContent;
    this.xacmlVersion = XACMLConstants.XACML_VERSION_2_0;
}
 
Example 4
Source File: RequestCtx.java    From balana with Apache License 2.0 3 votes vote down vote up
/**
 * Constructor that creates a <code>RequestCtx</code> from components.
 *
 * @param attributesSet
 * @param documentRoot the root node of the DOM tree for this request
 * @param resourceContent a text-encoded version of the content, suitable for including in the
 *            RequestType, including the root <code>RequestContent</code> node
 * 
 * @throws IllegalArgumentException if the inputs are not well formed
 */
public RequestCtx(Set<Attributes> attributesSet, Node documentRoot, String resourceContent)
                                                                throws IllegalArgumentException {

    this.attributesSet = attributesSet;
    this.documentRoot = documentRoot;
    this.resourceContent = resourceContent;
    this.xacmlVersion = XACMLConstants.XACML_VERSION_2_0;
}