KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > loom > xmlpolicy > metadata > KeyStoreMetaData


1 /*
2  * Copyright (C) The Spice Group. All rights reserved.
3  *
4  * This software is published under the terms of the Spice
5  * Software License version 1.1, a copy of which has been included
6  * with this distribution in the LICENSE.txt file.
7  */

8 package org.codehaus.loom.xmlpolicy.metadata;
9
10 /**
11  * This class defines a keystore that is used when locating
12  * signers of a codebase.
13  *
14  * @author Peter Donald
15  * @version $Revision: 1.1 $ $Date: 2004/04/19 22:20:25 $
16  */

17 public class KeyStoreMetaData
18 {
19     /**
20      * The name of the keystore. Used by Grants to
21      * refer to particular key stores.
22      */

23     private final String JavaDoc m_name;
24
25     /**
26      * The location of the keystore (usually a URL).
27      */

28     private final String JavaDoc m_location;
29
30     /**
31      * The type of the keystore.
32      */

33     private final String JavaDoc m_type;
34
35     /**
36      * Construct a keysotre.
37      *
38      * @param name the name of the key store
39      * @param location the location of keystore
40      * @param type the keystore type
41      */

42     public KeyStoreMetaData( final String JavaDoc name,
43                              final String JavaDoc location,
44                              final String JavaDoc type )
45     {
46         if( null == name )
47         {
48             throw new NullPointerException JavaDoc( "name" );
49         }
50         if( null == location )
51         {
52             throw new NullPointerException JavaDoc( "location" );
53         }
54         if( null == type )
55         {
56             throw new NullPointerException JavaDoc( "type" );
57         }
58
59         m_name = name;
60         m_location = location;
61         m_type = type;
62     }
63
64     /**
65      * Return the name of keystore.
66      *
67      * @return the name of keystore.
68      */

69     public String JavaDoc getName()
70     {
71         return m_name;
72     }
73
74     /**
75      * Return the location of the KeyStore (usually a URL).
76      *
77      * @return the location of the KeyStore (usually a URL).
78      */

79     public String JavaDoc getLocation()
80     {
81         return m_location;
82     }
83
84     /**
85      * Return the type of the key store (ie JKS).
86      *
87      * @return the type of the key store (ie JKS).
88      */

89     public String JavaDoc getType()
90     {
91         return m_type;
92     }
93 }
94
Popular Tags