Package org.apache.syncope.common.types

Examples of org.apache.syncope.common.types.AccountPolicySpec


                }
                result = (T) evaluatedPPSpec;
                break;
            case ACCOUNT:
            case GLOBAL_ACCOUNT:
                final AccountPolicySpec spec = policy.getSpecification();
                final AccountPolicySpec accountPolicy = new AccountPolicySpec();

                BeanUtils.copyProperties(spec, accountPolicy, new String[]{"schemasNotPermitted"});

                for (String schema : spec.getSchemasNotPermitted()) {
                    AbstractAttr attribute = attributable.getAttribute(schema);
                    if (attribute != null) {
                        List<String> values = attribute.getValuesAsStrings();
                        if (values != null && !values.isEmpty()) {
                            accountPolicy.getWordsNotPermitted().add(values.get(0));
                        }
                    }
                }

                result = (T) accountPolicy;
View Full Code Here


        try {
            // missing username
            for (Policy policy : getAccountPolicies(object)) {
                // evaluate policy
                final AccountPolicySpec accountPolicy = evaluator.evaluate(policy, object);

                // enforce policy
                apEnforcer.enforce(accountPolicy, policy.getType(), object);
            }
        } catch (Exception e) {
View Full Code Here

        switch (policyTO.getType()) {
            case GLOBAL_ACCOUNT:
            case ACCOUNT:
                spec = ((AccountPolicyTO) policyTO).getSpecification() != null
                        ? ((AccountPolicyTO) policyTO).getSpecification()
                        : new AccountPolicySpec();
                break;

            case GLOBAL_PASSWORD:
            case PASSWORD:
                spec = ((PasswordPolicyTO) policyTO).getSpecification() != null
View Full Code Here

        try {
            // missing username
            for (Policy policy : getAccountPolicies(object)) {
                // evaluate policy
                final AccountPolicySpec accountPolicy = evaluator.evaluate(policy, object);

                // enforce policy
                apEnforcer.enforce(accountPolicy, policy.getType(), object);
            }
        } catch (Exception e) {
View Full Code Here

    private SyncopeUser user;

    @Before
    public void setUp() {
        enforcer = new AccountPolicyEnforcer();
        spec = new AccountPolicySpec();
        user = new SyncopeUser();
    }
View Full Code Here

        try {
            // missing username
            for (Policy policy : getAccountPolicies(object)) {
                // evaluate policy
                final AccountPolicySpec accountPolicy = evaluator.evaluate(policy, object);

                // enforce policy
                apEnforcer.enforce(accountPolicy, policy.getType(), object);
            }
        } catch (Exception e) {
View Full Code Here

        switch (policyTO.getType()) {
            case GLOBAL_ACCOUNT:
            case ACCOUNT:
                spec = ((AccountPolicyTO) policyTO).getSpecification() != null
                        ? ((AccountPolicyTO) policyTO).getSpecification()
                        : new AccountPolicySpec();
                break;

            case GLOBAL_PASSWORD:
            case PASSWORD:
                spec = ((PasswordPolicyTO) policyTO).getSpecification() != null
View Full Code Here

        switch (policyTO.getType()) {
            case GLOBAL_ACCOUNT:
            case ACCOUNT:
                spec = ((AccountPolicyTO) policyTO).getSpecification() != null
                        ? ((AccountPolicyTO) policyTO).getSpecification()
                        : new AccountPolicySpec();
                break;

            case GLOBAL_PASSWORD:
            case PASSWORD:
                spec = ((PasswordPolicyTO) policyTO).getSpecification() != null
View Full Code Here

        switch (policyTO.getType()) {
            case GLOBAL_ACCOUNT:
            case ACCOUNT:
                spec = ((AccountPolicyTO) policyTO).getSpecification() != null
                        ? ((AccountPolicyTO) policyTO).getSpecification()
                        : new AccountPolicySpec();
                break;

            case GLOBAL_PASSWORD:
            case PASSWORD:
                spec = ((PasswordPolicyTO) policyTO).getSpecification() != null
View Full Code Here

            }

            // invalid username
            for (Policy policy : getAccountPolicies(user)) {
                // evaluate policy
                final AccountPolicySpec accountPolicy = evaluator.evaluate(policy, user);

                // enforce policy
                apEnforcer.enforce(accountPolicy, policy.getType(), user);
            }
        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.syncope.common.types.AccountPolicySpec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.