Java Code Examples for org.wso2.balana.utils.policy.dto.BasicPolicyDTO#setPolicyId()

The following examples show how to use org.wso2.balana.utils.policy.dto.BasicPolicyDTO#setPolicyId() . 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: PolicyEditorUtil.java    From carbon-identity-framework with Apache License 2.0 4 votes vote down vote up
public static BasicPolicyDTO createBasicPolicyDTO(String[] policyEditorData) {

        BasicPolicyDTO basicPolicyDTO = new BasicPolicyDTO();
        int i = 0;

        if (policyEditorData[i] != null) {
            basicPolicyDTO.setPolicyId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicPolicyDTO.setRuleAlgorithm(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicPolicyDTO.setVersion(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicPolicyDTO.setDescription(policyEditorData[i]);
        }
        i++;

        BasicTargetDTO basicTargetDTO = new BasicTargetDTO();

        if (policyEditorData[i] != null) {
            basicTargetDTO.setFunctionOnResources(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setResourceList(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setResourceId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setResourceDataType(policyEditorData[i]);
        }
        i++;

        if (policyEditorData[i] != null) {
            basicTargetDTO.setFunctionOnSubjects(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setSubjectList(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setSubjectId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setSubjectDataType(policyEditorData[i]);
        }
        i++;

        if (policyEditorData[i] != null) {
            basicTargetDTO.setFunctionOnActions(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setActionList(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setActionId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setActionDataType(policyEditorData[i]);
        }
        i++;

        if (policyEditorData[i] != null) {
            basicTargetDTO.setFunctionOnEnvironment(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setEnvironmentList(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setEnvironmentId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setEnvironmentDataType(policyEditorData[i]);
        }
        i++;

        basicPolicyDTO.setTargetDTO(basicTargetDTO);
        List<BasicRuleDTO> basicRuleDTOs = createBasicRuleDTOs(policyEditorData, i);
        if (basicRuleDTOs != null && basicRuleDTOs.size() > 0) {
            basicPolicyDTO.setBasicRuleDTOs(basicRuleDTOs);
        }

        return basicPolicyDTO;
    }
 
Example 2
Source File: PolicyEditorUtil.java    From carbon-identity-framework with Apache License 2.0 4 votes vote down vote up
public static BasicPolicyDTO createBasicPolicyDTO(String[] policyEditorData) {

        BasicPolicyDTO basicPolicyDTO = new BasicPolicyDTO();
        int i = 0;

        if (policyEditorData[i] != null) {
            basicPolicyDTO.setPolicyId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicPolicyDTO.setRuleAlgorithm(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicPolicyDTO.setVersion(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicPolicyDTO.setDescription(policyEditorData[i]);
        }
        i++;

        BasicTargetDTO basicTargetDTO = new BasicTargetDTO();

        if (policyEditorData[i] != null) {
            basicTargetDTO.setFunctionOnResources(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setResourceList(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setResourceId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setResourceDataType(policyEditorData[i]);
        }
        i++;

        if (policyEditorData[i] != null) {
            basicTargetDTO.setFunctionOnSubjects(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setSubjectList(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setSubjectId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setSubjectDataType(policyEditorData[i]);
        }
        i++;

        if (policyEditorData[i] != null) {
            basicTargetDTO.setFunctionOnActions(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setActionList(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setActionId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setActionDataType(policyEditorData[i]);
        }
        i++;

        if (policyEditorData[i] != null) {
            basicTargetDTO.setFunctionOnEnvironment(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setEnvironmentList(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setEnvironmentId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setEnvironmentDataType(policyEditorData[i]);
        }
        i++;

        basicPolicyDTO.setTargetDTO(basicTargetDTO);
        List<BasicRuleDTO> basicRuleDTOs = createBasicRuleDTOs(policyEditorData, i);
        if (basicRuleDTOs != null && basicRuleDTOs.size() > 0) {
            basicPolicyDTO.setBasicRuleDTOs(basicRuleDTOs);
        }

        return basicPolicyDTO;
    }
 
Example 3
Source File: PolicyEditorUtil.java    From carbon-identity with Apache License 2.0 4 votes vote down vote up
public static BasicPolicyDTO createBasicPolicyDTO(String[] policyEditorData) {

        BasicPolicyDTO basicPolicyDTO = new BasicPolicyDTO();
        int i = 0;

        if (policyEditorData[i] != null) {
            basicPolicyDTO.setPolicyId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicPolicyDTO.setRuleAlgorithm(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicPolicyDTO.setVersion(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicPolicyDTO.setDescription(policyEditorData[i]);
        }
        i++;

        BasicTargetDTO basicTargetDTO = new BasicTargetDTO();

        if (policyEditorData[i] != null) {
            basicTargetDTO.setFunctionOnResources(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setResourceList(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setResourceId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setResourceDataType(policyEditorData[i]);
        }
        i++;

        if (policyEditorData[i] != null) {
            basicTargetDTO.setFunctionOnSubjects(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setSubjectList(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setSubjectId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setSubjectDataType(policyEditorData[i]);
        }
        i++;

        if (policyEditorData[i] != null) {
            basicTargetDTO.setFunctionOnActions(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setActionList(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setActionId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setActionDataType(policyEditorData[i]);
        }
        i++;

        if (policyEditorData[i] != null) {
            basicTargetDTO.setFunctionOnEnvironment(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setEnvironmentList(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setEnvironmentId(policyEditorData[i]);
        }
        i++;
        if (policyEditorData[i] != null) {
            basicTargetDTO.setEnvironmentDataType(policyEditorData[i]);
        }
        i++;

        basicPolicyDTO.setTargetDTO(basicTargetDTO);
        List<BasicRuleDTO> basicRuleDTOs = createBasicRuleDTOs(policyEditorData, i);
        if (basicRuleDTOs != null && basicRuleDTOs.size() > 0) {
            basicPolicyDTO.setBasicRuleDTOs(basicRuleDTOs);
        }

        return basicPolicyDTO;
    }