Package org.jboss.security.xacml.sunxacml.ctx

Examples of org.jboss.security.xacml.sunxacml.ctx.Status


     * Private helper to create a new processing error status result
     */
    private EvaluationResult createProcessingError(String msg) {
        ArrayList code = new ArrayList();
        code.add(Status.STATUS_PROCESSING_ERROR);
        return new EvaluationResult(new Status(code, msg));
    }
View Full Code Here


            if (result == MatchResult.MATCH) {
                // if we matched before, this is an error...
                if (selectedPolicy != null) {
                    ArrayList code = new ArrayList();
                    code.add(Status.STATUS_PROCESSING_ERROR);
                    Status status = new Status(code, "too many applicable top-"
                                               + "level policies");
                    return new PolicyFinderResult(status);
                }

                // ...otherwise remember this policy
View Full Code Here

                if (atLeastOne) {
                    List code = new ArrayList();
                    code.add(Status.STATUS_PROCESSING_ERROR);
                    String message = "Too many applicable policies";
                    return new Result(Result.DECISION_INDETERMINATE,
                                      new Status(code, message),
                                      context.getResourceId().encode());
                }

                // if this was the first applicable policy in the set, then
                // remember it for later
View Full Code Here

     * Helper function to create a processing error message.
     */
    private static EvaluationResult makeProcessingError(String message) {
        ArrayList code = new ArrayList();
        code.add(Status.STATUS_PROCESSING_ERROR);
        return new EvaluationResult(new Status(code, message));
    }
View Full Code Here

    public Result combine(EvaluationCtx context, List parameters,
                          List policyElements) {
        boolean atLeastOneError = false;
        boolean atLeastOneDeny = false;
        Set denyObligations = new HashSet();
        Status firstIndeterminateStatus = null;
        Iterator it = policyElements.iterator();

        while (it.hasNext()) {
            AbstractPolicy policy =
                ((PolicyCombinerElement)(it.next())).getPolicy();
View Full Code Here

        // Build up the processing error Status.
        if (processingErrList == null) {
            String [] errStrings = { Status.STATUS_PROCESSING_ERROR };
            processingErrList = Arrays.asList(errStrings);
        }
        Status errStatus = new Status(processingErrList, message);
        EvaluationResult processingError = new EvaluationResult(errStatus);

        return processingError;
    }
View Full Code Here

     * includes the given string.
     */
    private EvaluationResult makeProcessingError(String message) {
        ArrayList code = new ArrayList();
        code.add(Status.STATUS_PROCESSING_ERROR);
        return new EvaluationResult(new Status(code, message));
    }
View Full Code Here

               break;
            default:
               throw new IllegalStateException("Unknown code");
         }
         //Status
         Status status = result.getStatus();
         StatusType statusType = objectFactory.createStatusType();
         StatusCodeType statusCodeType = objectFactory.createStatusCodeType();
         List statusList = status.getCode();
         if(statusList != null && statusList.size() > 0)
         {
            statusCodeType.setValue((String) statusList.get(0));
         }
         statusType.setStatusMessage(status.getMessage());
         statusType.setStatusCode(statusCodeType);
         resultType.setStatus(statusType);
        
         //Obligations
         Set<Obligation> obligationsSet = result.getObligations();
View Full Code Here

         if (selectedPolicy != null)
         {
            // we found a match before, so this is an error
            ArrayList<String> code = new ArrayList<String>();
            code.add(Status.STATUS_PROCESSING_ERROR);
            Status status = new Status(code, "too many applicable " + "top-level policies");
            return new PolicyFinderResult(status);
         }

         // this is the first match we've found, so remember it
         selectedPolicy = policySet;
View Full Code Here

TOP

Related Classes of org.jboss.security.xacml.sunxacml.ctx.Status

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.