Examples of Obligation


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

Examples of com.sun.xacml.Obligation

                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

Examples of com.sun.xacml.Obligation

                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

Examples of com.sun.xacml.Obligation

        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

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

Examples of com.sun.xacml.Obligation

                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

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

Examples of edu.umd.cs.findbugs.ba.obl.Obligation

            SplitCamelCaseIdentifier splitter = new SplitCamelCaseIdentifier(methodName);
            methodHasCloseInName = splitter.split().contains("close");
            Obligation[] paramObligationTypes = database.getFactory().getParameterObligationTypes(xmethod);

            for (int i = 0; i < xmethod.getNumParams(); i++) {
                Obligation obligationType = paramObligationTypes[i];
                if (obligationType == null) {
                    continue;
                }
                if (methodHasCloseInName) {
                    // Method has "close" in its name.
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.obl.Obligation

            //
            // Report a separate BugInstance for each Obligation,State pair.
            // (Two different obligations may be leaked in the same state.)
            //
            for (Map.Entry<Obligation, State> entry : leakedObligationMap.entrySet()) {
                Obligation obligation = entry.getKey();
                State state = entry.getValue();
                reportWarning(obligation, state, factAtExit);
            }
            // TODO: closing of nonexistent resources
View Full Code Here

Examples of edu.umd.cs.findbugs.ba.obl.Obligation

                    throw new IllegalStateException("path " + path + " at cfg exit has no label for exit block");
                }
            }

            for (int id = 0; id < database.getFactory().getMaxObligationTypes(); ++id) {
                Obligation obligation = database.getFactory().getObligationById(id);
                // If the raw count produced by the analysis
                // for this obligation type is 0,
                // assume everything is ok on this state's path.
                int rawLeakCount = state.getObligationSet().getCount(id);
                if (rawLeakCount == 0) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.