Package com.sun.xacml.combine

Examples of com.sun.xacml.combine.CombiningAlgFactory


     * @param algorithms accepts a Set of CombiningAlgorithm impls
     * @return
     */
    public CombiningAlgFactory useAlgorithms(Set<CombiningAlgorithm> algorithms) {
        CombiningAlgFactory result = new BaseCombiningAlgFactory();
        for (CombiningAlgorithm algorithm: algorithms){
            result.addAlgorithm(algorithm);
        }
        return result;
    }
View Full Code Here


       
        // now get the combining algorithm...
        try {
            URI algId = new URI(attrs.getNamedItem(combiningName).
                                getNodeValue());
            CombiningAlgFactory factory = CombiningAlgFactory.getInstance();
            combiningAlg = factory.createAlgorithm(algId);
        } catch (Exception e) {
            throw new ParsingException("Error parsing combining algorithm" +
                                       " in " + policyPrefix, e);
        }
       
View Full Code Here

        }

        // now get the combining algorithm...
        try {
            URI algId = new URI(attrs.getNamedItem(combiningName).getNodeValue());
            CombiningAlgFactory factory = CombiningAlgFactory.getInstance();
            combiningAlg = factory.createAlgorithm(algId);
        } catch (Exception e) {
            throw new ParsingException("Error parsing combining algorithm" + " in " + policyPrefix,
                    e);
        }
View Full Code Here

    /**
     * Private helper that handles the combiningAlgFactory elements.
     */
    private CombiningAlgFactory parseCombiningAlgFactory(Node root) throws ParsingException {
        CombiningAlgFactory factory = null;

        // check if we're starting with the standard factory setup
        if (useStandard(root, "useStandardAlgorithms")) {
            logger.config("Starting with standard Combining Algorithms");

            factory = StandardCombiningAlgFactory.getNewFactory();
        } else {
            factory = new BaseCombiningAlgFactory();
        }

        // now look for all algorithms specified for this factory, adding
        // them as we go
        NodeList children = root.getChildNodes();
        for (int i = 0; i < children.getLength(); i++) {
            Node child = children.item(i);

            if (child.getNodeName().equals("algorithm")) {
                // an algorithm is a simple class element
                CombiningAlgorithm alg = (CombiningAlgorithm) (loadClass("algorithm", child));
                try {
                    factory.addAlgorithm(alg);
                } catch (IllegalArgumentException iae) {
                    throw new ParsingException("duplicate combining " + "algorithm: "
                            + alg.getIdentifier().toString(), iae);
                }
            }
View Full Code Here

     * registering each factory individually.
     */
    public void registerCombiningAlgFactories() {

        for (String id : combiningMap.keySet()) {
            CombiningAlgFactory cf = (CombiningAlgFactory) (combiningMap.get(id));

            try {
                CombiningAlgFactory.registerFactory(id, new CAFProxy(cf));
            } catch (IllegalArgumentException iae) {
                logger.log(Level.WARNING, "Couldn't register " + "CombiningAlgFactory: " + id
View Full Code Here

TOP

Related Classes of com.sun.xacml.combine.CombiningAlgFactory

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.