Search in sources :

Example 1 with PolicyType

use of org.apache.syncope.common.lib.types.PolicyType in project syncope by apache.

the class PolicyResultManager method printPoliciesByType.

public void printPoliciesByType(final String policyTypeString, final List<PolicyTO> policyTOs) {
    System.out.println("");
    final PolicyType policyType = PolicyType.valueOf(policyTypeString);
    switch(policyType) {
        case ACCOUNT:
            policyTOs.forEach(policyTO -> {
                printAccountPolicy((AccountPolicyTO) policyTO);
            });
            break;
        case PASSWORD:
            policyTOs.forEach(policyTO -> {
                printPasswordPolicy((PasswordPolicyTO) policyTO);
            });
            break;
        case PUSH:
            policyTOs.forEach(policyTO -> {
                System.out.println(policyTO);
            });
            break;
        case PULL:
            policyTOs.forEach(policyTO -> {
                printPullPolicy((PullPolicyTO) policyTO);
            });
            break;
        default:
            break;
    }
}
Also used : PolicyType(org.apache.syncope.common.lib.types.PolicyType)

Aggregations

PolicyType (org.apache.syncope.common.lib.types.PolicyType)1