Package com.sun.xacml

Examples of com.sun.xacml.Obligation


    }

    private void checkForObligation(ResponseCtx response) {
        Result result = response.getResults().iterator().next();
        assertNotNull(result);
        Obligation obligation = result.getObligations().iterator().next();
        assertNotNull(obligation);
        Attribute assignment = obligation.getAssignments().iterator().next();
        GeometryAttribute geomAttr = (GeometryAttribute) assignment.getValue();
        assertNotNull(geomAttr.getGeometry());

    }
View Full Code Here


                Log.severe("Geserver cannot access its catalog !!!");
                Log.severe(XACMLUtil.asXMLString(requestCtx));
                return useDefaultMode();
            }

            Obligation obligation = result.getObligations().iterator().next();
            if (obligation == null
                    || XACMLConstants.CatalogModeObligationId.equals(obligation.getId()
                            .toASCIIString()) == false) {
                Log.severe("No obligation with id: " + XACMLConstants.CatalogModeObligationId);
                Log.severe(XACMLUtil.asXMLString(requestCtx));
                return useDefaultMode();
            }

            Attribute catalogModeAssignment = obligation.getAssignments().iterator().next();
            if (catalogModeAssignment == null
                    || CatalogModeMap.containsKey(((StringAttribute) catalogModeAssignment
                            .getValue()).getValue()) == false) {
                Log.severe("No valid catalog mode ");
                Log.severe(XACMLUtil.asXMLString(requestCtx));
View Full Code Here

                Log.severe("Geserver cannot access its catalog !!!");
                Log.severe(XACMLUtil.asXMLString(requestCtx));
                return useDefaultMode();
            }

            Obligation obligation = result.getObligations().iterator().next();
            if (obligation == null
                    || XACMLConstants.CatalogModeObligationId.equals(obligation.getId()
                            .toASCIIString()) == false) {
                Log.severe("No obligation with id: " + XACMLConstants.CatalogModeObligationId);
                Log.severe(XACMLUtil.asXMLString(requestCtx));
                return useDefaultMode();
            }

            Attribute catalogModeAssignment = obligation.getAssignments().iterator().next();
            if (catalogModeAssignment == null
                    || CatalogModeMap.containsKey(((StringAttribute) catalogModeAssignment
                            .getValue()).getValue()) == false) {
                Log.severe("No valid catalog mode ");
                Log.severe(XACMLUtil.asXMLString(requestCtx));
View Full Code Here

        HashSet<Obligation> set2 = new HashSet<Obligation>(obs2);

        // consider each Obligation in the first set, and try to find an
        // equivalent one in the second set
        while (it1.hasNext()) {
            Obligation o1 = it1.next();
            Iterator<Obligation> it2 = set2.iterator();
            boolean matched = false;

            // go through the second set, and see if there's a matching
            // Obligation
            while (it2.hasNext() && (!matched)) {
                Obligation o2 = (Obligation) (it2.next());

                // to be equivalent, they need to have the same identifier
                // and the same fulfillOn setting
                if ((o1.getId().equals(o2.getId())) && (o1.getFulfillOn() == o2.getFulfillOn())) {
                    // get the assignments, and make sure they match
                    List<Attribute> assignments1 = o1.getAssignments();
                    List<Attribute> assignments2 = o2.getAssignments();

                    if (assignments1.size() == assignments2.size()) {
                        Iterator<Attribute> ait1 = assignments1.iterator();
                        Iterator<Attribute> ait2 = assignments2.iterator();
                        boolean assignmentsMatch = true;
View Full Code Here

    }

    private void checkForObligation(ResponseCtx response) {
        Result result = response.getResults().iterator().next();
        assertNotNull(result);
        Obligation obligation = result.getObligations().iterator().next();
        assertNotNull(obligation);
        Attribute assignment = obligation.getAssignments().iterator().next();
        GeometryAttribute geomAttr = (GeometryAttribute) assignment.getValue();
        assertNotNull(geomAttr.getGeometry());

    }
View Full Code Here

                Log.severe("Geserver cannot access its catalog !!!");
                Log.severe(XACMLUtil.asXMLString(requestCtx));
                return useDefaultMode();
            }

            Obligation obligation = result.getObligations().iterator().next();
            if (obligation == null
                    || XACMLConstants.CatalogModeObligationId.equals(obligation.getId()
                            .toASCIIString()) == false) {
                Log.severe("No obligation with id: " + XACMLConstants.CatalogModeObligationId);
                Log.severe(XACMLUtil.asXMLString(requestCtx));
                return useDefaultMode();
            }

            Attribute catalogModeAssignment = obligation.getAssignments().iterator().next();
            if (catalogModeAssignment == null
                    || CatalogModeMap.containsKey(((StringAttribute) catalogModeAssignment
                            .getValue()).getValue()) == false) {
                Log.severe("No valid catalog mode ");
                Log.severe(XACMLUtil.asXMLString(requestCtx));
View Full Code Here

    }

    private void checkForObligation(ResponseCtx response) {
        Result result = response.getResults().iterator().next();
        assertNotNull(result);
        Obligation obligation = result.getObligations().iterator().next();
        assertNotNull(obligation);
        Attribute assignment = obligation.getAssignments().iterator().next();
        GeometryAttribute geomAttr = (GeometryAttribute) assignment.getValue();
        assertNotNull(geomAttr.getGeometry());

    }
View Full Code Here

TOP

Related Classes of com.sun.xacml.Obligation

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.