1 8 package org.codehaus.loom.xmlpolicy.metadata; 9 10 17 public class GrantMetaData 18 { 19 22 private final String m_codebase; 23 24 28 private final String m_signedBy; 29 30 34 private final String m_keyStore; 35 36 39 private final PermissionMetaData[] m_permissions; 40 41 49 public GrantMetaData( final String codebase, 50 final String signedBy, 51 final String keyStore, 52 final PermissionMetaData[] permissions ) 53 { 54 if( null == permissions ) 55 { 56 throw new NullPointerException ( "permissions" ); 57 } 58 if( null == signedBy && null != keyStore ) 59 { 60 throw new NullPointerException ( "signedBy" ); 61 } 62 if( null == keyStore && null != signedBy ) 63 { 64 throw new NullPointerException ( "keyStore" ); 65 } 66 for( int i = 0; i < permissions.length; i++ ) 67 { 68 if( null == permissions[ i ] ) 69 { 70 throw new NullPointerException ( "permissions[" + i + "]" ); 71 } 72 } 73 74 m_codebase = codebase; 75 m_signedBy = signedBy; 76 m_keyStore = keyStore; 77 m_permissions = permissions; 78 } 79 80 85 public String getCodebase() 86 { 87 return m_codebase; 88 } 89 90 95 public String getSignedBy() 96 { 97 return m_signedBy; 98 } 99 100 105 public String getKeyStore() 106 { 107 return m_keyStore; 108 } 109 110 115 public PermissionMetaData[] getPermissions() 116 { 117 return m_permissions; 118 } 119 } 120 | Popular Tags |