Examples of PolicyParser


Examples of com.cloud.bridge.util.PolicyParser

                if (null == policyInJson) {
                    ServiceProvider.getInstance().setBucketPolicy(context.getBucketName(), null);
                    return null;
                }

                PolicyParser parser = new PolicyParser();
                policy = parser.parse( policyInJson, context.getBucketName());
                if (null != policy)
                    ServiceProvider.getInstance().setBucketPolicy(context.getBucketName(), policy);
            }
        }
        return policy;
View Full Code Here

Examples of org.fcrepo.server.security.PolicyParser

                String schemaPath =
                    ((schemaLocation)
                            .startsWith(File.separator) ? "" : serverHome)
                            + schemaLocation;
                FileInputStream in = new FileInputStream(schemaPath);
                PolicyParser policyParser = new PolicyParser(in);
                ValidationUtility.setFeslPolicyParser(policyParser);
            } catch (IOException ioe) {
                throw new PolicyStoreException(ioe.getMessage(),ioe);
            } catch (SAXException se) {
                throw new PolicyStoreException(se.getMessage(),se);
View Full Code Here

Examples of org.fcrepo.server.security.PolicyParser

    private static final String SCHEMA_BAD = "<not-a-schema/>";

    @Test (expected=SAXException.class)
    public void testConstructWithBadSchema() throws IOException, SAXException {
        new PolicyParser(StreamUtility.getStream(SCHEMA_BAD));
    }
View Full Code Here

Examples of org.fcrepo.server.security.PolicyParser

    }

    @Test (expected=ValidationException.class)
    public void testParseMalformedXMLValidationFalse()
            throws IOException, SAXException, ValidationException {
        PolicyParser parser = new MockPolicyParser();
        parser.parse(StreamUtility.getStream(POLICY_MALFORMEDXML), false);
    }
View Full Code Here

Examples of org.fcrepo.server.security.PolicyParser

    }

    @Test (expected=ValidationException.class)
    public void testParseMalformedXMLValidationTrue()
            throws IOException, SAXException, ValidationException {
        PolicyParser parser = new MockPolicyParser();
        parser.parse(StreamUtility.getStream(POLICY_MALFORMEDXML), true);
    }
View Full Code Here

Examples of org.fcrepo.server.security.PolicyParser

    }

    @Test (expected=ValidationException.class)
    public void testParseBadRootValidationFalse()
            throws IOException, SAXException, ValidationException {
        PolicyParser parser = new MockPolicyParser();
        parser.parse(StreamUtility.getStream(POLICY_BADROOT), false);
    }
View Full Code Here

Examples of org.fcrepo.server.security.PolicyParser

    }

    @Test (expected=ValidationException.class)
    public void testParseBadRootValidationTrue()
            throws IOException, SAXException, ValidationException {
        PolicyParser parser = new MockPolicyParser();
        parser.parse(StreamUtility.getStream(POLICY_BADROOT), true);
    }
View Full Code Here

Examples of org.fcrepo.server.security.PolicyParser

    }

    @Test (expected=ValidationException.class)
    public void testParseGoodRootNoContentValidationFalse()
            throws IOException, SAXException, ValidationException {
        PolicyParser parser = new MockPolicyParser();
        parser.parse(StreamUtility.getStream(POLICY_GOODROOT_NOCONTENT), false);
    }
View Full Code Here

Examples of org.fcrepo.server.security.PolicyParser

    }

    @Test (expected=ValidationException.class)
    public void testParseGoodRootNoContentValidationTrue()
            throws IOException, SAXException, ValidationException {
        PolicyParser parser = new MockPolicyParser();
        parser.parse(StreamUtility.getStream(POLICY_GOODROOT_NOCONTENT), true);
    }
View Full Code Here

Examples of org.fcrepo.server.security.PolicyParser

    }

    @Test
    public void testParseGoodRootQuestionableContentValidationFalse()
            throws IOException, SAXException, ValidationException {
        PolicyParser parser = new MockPolicyParser();
        parser.parse(StreamUtility.getStream(POLICY_QUESTIONABLE), false);
    }
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.