Package org.codehaus.loom.xmlpolicy.metadata

Examples of org.codehaus.loom.xmlpolicy.metadata.KeyStoreMetaData


    public void testNullNameInKeyStoreCtor()
        throws Exception
    {
        try
        {
            new KeyStoreMetaData( null, "", "" );
            fail( "Expected to fail due to null pointer in ctor" );
        }
        catch( final NullPointerException npe )
        {
            assertEquals( "NPE message",
View Full Code Here


    public void testNullLocationInKeyStoreCtor()
        throws Exception
    {
        try
        {
            new KeyStoreMetaData( "", null, "" );
            fail( "Expected to fail due to null pointer in ctor" );
        }
        catch( final NullPointerException npe )
        {
            assertEquals( "NPE message",
View Full Code Here

        assertEquals( "Policy KeyStore Count",
                      1,
                      policy.getKeyStores().length );

        final KeyStoreMetaData keyStore = policy.getKeyStores()[ 0 ];
        assertEquals( "KeyStore Name",
                      "myKeystore",
                      keyStore.getName() );
        assertEquals( "KeyStore Location",
                      "sar:/conf/keystore",
                      keyStore.getLocation() );
        assertEquals( "KeyStore Type",
                      "JKS",
                      keyStore.getType() );

        assertEquals( "Policy Grant Count",
                      2,
                      policy.getGrants().length );
View Full Code Here

    public void testNullTypeInKeyStoreCtor()
        throws Exception
    {
        try
        {
            new KeyStoreMetaData( "", "", null );
            fail( "Expected to fail due to null pointer in ctor" );
        }
        catch( final NullPointerException npe )
        {
            assertEquals( "NPE message",
View Full Code Here

        assertEquals( "Policy KeyStore Count",
                      1,
                      policy.getKeyStores().length );

        final KeyStoreMetaData keyStore = policy.getKeyStores()[ 0 ];
        assertEquals( "KeyStore Name",
                      "default",
                      keyStore.getName() );
        assertEquals( "KeyStore Location",
                      "sar:/conf/keystore",
                      keyStore.getLocation() );
        assertEquals( "KeyStore Type",
                      "JKS",
                      keyStore.getType() );

        assertEquals( "Policy Grant Count",
                      2,
                      policy.getGrants().length );
View Full Code Here

            new PermissionMetaData( FilePermission.class.getName(), "/", "read",
                                    null, null );
        final GrantMetaData grant =
            new GrantMetaData( "file:/", "jenny", "default",
                               new PermissionMetaData[]{permission} );
        final KeyStoreMetaData keyStore =
            new KeyStoreMetaData( "default", "http://spice.sourceforge.net", "DoDgY" );
        final PolicyMetaData metaData =
            new PolicyMetaData( new KeyStoreMetaData[]{keyStore}, new GrantMetaData[]{grant} );
        final TestResolver resolver = new TestResolver();
        final Policy policy = builder.buildPolicy( metaData, resolver );
        final CodeSource codesource =
View Full Code Here

            new PermissionMetaData( RuntimePermission.class.getName(), "getFactory", null,
                                    null, null );
        final GrantMetaData grant =
            new GrantMetaData( "file:/", "jenny,mischelle,jenny", "default",
                               new PermissionMetaData[]{permission} );
        final KeyStoreMetaData keyStore =
            new KeyStoreMetaData( "default", "http://spice.sourceforge.net", "DoDgY" );
        final PolicyMetaData metaData =
            new PolicyMetaData( new KeyStoreMetaData[]{keyStore}, new GrantMetaData[]{grant} );
        final TestResolver resolver = new TestResolver();
        final Policy policy = builder.buildPolicy( metaData, resolver );
        final CodeSource codesource =
View Full Code Here

            new PermissionMetaData( AllPermission.class.getName(), null, null,
                                    "jenny", "default" );
        final GrantMetaData grant =
            new GrantMetaData( "file:/", "jenny", "default",
                               new PermissionMetaData[]{permission} );
        final KeyStoreMetaData keyStore =
            new KeyStoreMetaData( "default", "http://spice.sourceforge.net", "DoDgY" );
        final PolicyMetaData metaData =
            new PolicyMetaData( new KeyStoreMetaData[]{keyStore}, new GrantMetaData[]{grant} );
        final TestResolver resolver = new TestResolver();
        final Policy policy = builder.buildPolicy( metaData, resolver );
        final CodeSource codesource =
View Full Code Here

            new PermissionMetaData( AllPermission.class.getName() + "sss", null, null,
                                    null, null );
        final GrantMetaData grant =
            new GrantMetaData( "file:/", "jenny", "default",
                               new PermissionMetaData[]{permission} );
        final KeyStoreMetaData keyStore =
            new KeyStoreMetaData( "default", "http://spice.sourceforge.net", "DoDgY" );
        final PolicyMetaData metaData =
            new PolicyMetaData( new KeyStoreMetaData[]{keyStore}, new GrantMetaData[]{grant} );
        final TestResolver resolver = new TestResolver();
        final Policy policy = builder.buildPolicy( metaData, resolver );
        final CodeSource codesource =
View Full Code Here

            new PermissionMetaData( AllPermission.class.getName() + "sss", null, null,
                                    null, null );
        final GrantMetaData grant =
            new GrantMetaData( "file:/", "jenny", "default",
                               new PermissionMetaData[]{permission} );
        final KeyStoreMetaData keyStore =
            new KeyStoreMetaData( "default", "http://spice.sourceforge.net/NoExist", "DoDgY" );
        final PolicyMetaData metaData =
            new PolicyMetaData( new KeyStoreMetaData[]{keyStore}, new GrantMetaData[]{grant} );
        final TestResolver resolver = new TestResolver();
        try
        {
View Full Code Here

TOP

Related Classes of org.codehaus.loom.xmlpolicy.metadata.KeyStoreMetaData

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.