Package com.sun.xacml

Examples of com.sun.xacml.ProcessingException


      return null;
    }

    if(documentCount > 1)
    {
      throw new ProcessingException("Too many applicable policies for " + attributeQName.getLocalName() + " '" +  attributeValue + "'");
    }

    return (DocumentImpl)documentSet.getDocumentIterator().next();
  }
View Full Code Here


        } else {
            if (manager != null)
                return manager.getVariableType(variableId);
        }

        throw new ProcessingException("couldn't resolve the type");
    }
View Full Code Here

        } else {
            if (manager != null)
                return manager.returnsBag(variableId);
        }

        throw new ProcessingException("couldn't resolve the return type");
    }
View Full Code Here

        super(identifierURI);

        // if the timezone is unspecified, it's illegal for the defaulted
        // timezone to also be unspecified
        if ((timeZone == TZ_UNSPECIFIED) && (defaultedTimeZone == TZ_UNSPECIFIED))
            throw new ProcessingException("default timezone must be specified"
                    + "when a timezone is provided");

        init(time, nanoseconds, timeZone, defaultedTimeZone);
    }
View Full Code Here

    public VariableDefinition getDefinition(String variableId) {
        VariableState state = (VariableState) (idMap.get(variableId));

        // make sure this is an identifier we handle
        if (state == null)
            throw new ProcessingException("variable is unsupported: " + variableId);

        // if we've resolved the definition before, then we're done
        if (state.definition != null)
            return state.definition;

        // we don't have the definition, so get the DOM node
        Node node = state.rootNode;

        // we can't keep going unless we have a node to work with
        if (node != null) {
            // if we've already started parsing this node before, then
            // don't start again
            if (state.handled)
                throw new ProcessingException("processing in progress");

            // keep track of the fact that we're parsing this node, and
            // also get the type (if it's an Apply node)
            state.handled = true;
            discoverApplyType(node, state);

            try {
                // now actually try parsing the definition...remember that
                // if its expression has a reference, we could end up
                // calling this manager method again
                state.definition = VariableDefinition.getInstance(state.rootNode, metaData, this);

                return state.definition;
            } catch (ParsingException pe) {
                // we failed to parse the definition for some reason
                throw new ProcessingException("failed to parse the definition", pe);
            }
        }

        // we couldn't figure out how to resolve the definition
        throw new ProcessingException("couldn't retrieve definition: " + variableId);
    }
View Full Code Here

    public URI getVariableType(String variableId) {
        VariableState state = (VariableState) (idMap.get(variableId));

        // make sure the variable is supported
        if (state == null)
            throw new ProcessingException("variable not supported: " + variableId);

        // if we've previously figured out the type, then return that
        if (state.type != null)
            return state.type;

        // we haven't figured out the type already, so see if we have or
        // can resolve the definition
        VariableDefinition definition = state.definition;
        if (definition == null)
            definition = getDefinition(variableId);

        // if we could get the definition, then ask it for the type
        if (definition != null)
            return definition.getExpression().getType();

        // we exhausted all our ways to get the right answer
        throw new ProcessingException("we couldn't establish the type: " + variableId);
    }
View Full Code Here

    public boolean returnsBag(String variableId) {
        VariableState state = (VariableState) (idMap.get(variableId));

        // make sure the variable is supported
        if (state == null)
            throw new ProcessingException("variable not supported: " + variableId);

        // the flag is only valid if a type has also been determined
        if (state.type != null)
            return state.returnsBag;

        // we haven't figured out the type already, so see if we have or
        // can resolve the definition
        VariableDefinition definition = state.definition;
        if (definition == null)
            definition = getDefinition(variableId);

        // if we could get the definition, then ask it for the bag return
        if (definition != null)
            return definition.getExpression().returnsBag();

        // we exhausted all our ways to get the right answer
        throw new ProcessingException("couldn't establish bag return for " + variableId);
    }
View Full Code Here

TOP

Related Classes of com.sun.xacml.ProcessingException

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.