Package org.codehaus.loom.xmlpolicy.reader

Examples of org.codehaus.loom.xmlpolicy.reader.PolicyReader


    {
        final SarPolicyResolver resolver = new SarPolicyResolver(
            baseDirectory, workDirectory );
        setupLogger( resolver );
        final PolicyBuilder builder = new PolicyBuilder();
        final PolicyReader reader = new PolicyReader();
        final SarPolicyVerifier verifier = new SarPolicyVerifier();
        setupLogger( verifier );

        final Element element = ConfigurationUtil.toElement( configuration );
        final HashMap newData = new HashMap();
        newData.putAll( m_data );
        newData.putAll( data );
        newData.put( "/", File.separator );

        m_expander.expandValues( element, newData );

        element.setAttribute( "version", "1.0" );
        try
        {
            final PolicyMetaData policy = reader.readPolicy( element );
            verifier.verifyPolicy( policy );
            return builder.buildPolicy( policy, resolver );
        }
        catch( final Exception e )
        {
View Full Code Here


    protected PolicyMetaData buildFromStream( final InputStream stream )
        throws Exception
    {
        try
        {
            final PolicyReader builder = new PolicyReader();
            final Document config = load( stream );
            return builder.readPolicy( config.getDocumentElement() );
        }
        catch( final Exception e )
        {
            fail( "Error building Policy: " + e );
            return null;
View Full Code Here

TOP

Related Classes of org.codehaus.loom.xmlpolicy.reader.PolicyReader

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.