Package org.glite.authz.pap.common.xacml.wizard.exceptions

Examples of org.glite.authz.pap.common.xacml.wizard.exceptions.UnsupportedTargetException


            List<SubjectType> subjectList = subjects.getSubjects();

            if (!subjectList.isEmpty()) {

                if (subjectList.size() > 1) {
                    throw new UnsupportedTargetException("Only one SubjectType is allowed");
                }

                attributeList.addAll(SubjectMatchHelper.getAttributeList(subjectList.get(0).getSubjectMatches()));
            }
        }

        // get resources
        ResourcesType resources = target.getResources();

        if (resources != null) {
            List<ResourceType> resourceList = resources.getResources();

            if (!resourceList.isEmpty()) {

                if (resourceList.size() > 1) {
                    throw new UnsupportedTargetException("Only one ResourceType is allowed");
                }

                attributeList.addAll(ResourceMatchHelper.getAttributeList(resourceList.get(0).getResourceMatches()));
            }
        }

        // get actions
        ActionsType actions = target.getActions();

        if (actions != null) {
            List<ActionType> actionList = actions.getActions();

            if (!actionList.isEmpty()) {

                if (actionList.size() > 1) {
                    throw new UnsupportedTargetException("Only one ActionType is allowed");
                }

                attributeList.addAll(ActionMatchHelper.getAttributeList(actionList.get(0).getActionMatches()));
            }
        }

        // get environments
        EnvironmentsType environments = target.getEnvironments();

        if (environments != null) {
            List<EnvironmentType> environmentList = environments.getEnvrionments();

            if (!environmentList.isEmpty()) {

                if (environmentList.size() > 1) {
                    throw new UnsupportedTargetException("Only one EnvironmentType is allowed");
                }

                attributeList.addAll(EnvironmentMatchHelper.getAttributeList(environmentList.get(0).getEnvrionmentMatches()));
            }
        }
View Full Code Here

TOP

Related Classes of org.glite.authz.pap.common.xacml.wizard.exceptions.UnsupportedTargetException

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.