KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sslexplorer > realms > DefaultRealm


1 package com.sslexplorer.realms;
2
3 import java.io.Serializable JavaDoc;
4 import java.util.Calendar JavaDoc;
5
6 import com.sslexplorer.policyframework.AbstractResource;
7 import com.sslexplorer.policyframework.PolicyConstants;
8
9 /**
10  * Default implementation of a
11  * {@link com.sslexplorer.properties.PropertyProfile}.
12  *
13  * @author James D Robinson <a HREF="mailto:james@3sp.com">&lt;james@3sp.com&gt;</a>
14  *
15  */

16 public class DefaultRealm extends AbstractResource implements Realm, Serializable JavaDoc {
17     private static final long serialVersionUID = 4283488241230531541L;
18     private String JavaDoc type;
19     private boolean hasUserDatabase = false;
20     
21     /**
22      * Required for Serialization!
23      */

24     private DefaultRealm() {
25     }
26     
27     /**
28      * @param type
29      * @param resourceId
30      * @param resourceName
31      * @param resourceDescription
32      * @param dateCreated
33      * @param dateAmended
34      */

35     public DefaultRealm(String JavaDoc type, int resourceId, String JavaDoc resourceName, String JavaDoc resourceDescription, Calendar JavaDoc dateCreated, Calendar JavaDoc dateAmended) {
36         // note the realm id and the resourtce id are the same.
37
super(resourceId, PolicyConstants.REALMS_RESOURCE_TYPE, resourceId, resourceName, resourceDescription, dateCreated, dateAmended);
38         this.type = type;
39     }
40
41     /* (non-Javadoc)
42      * @see com.sslexplorer.realms.Realm#getType()
43      */

44     public String JavaDoc getType() {
45         return type;
46     }
47
48     /* (non-Javadoc)
49      * @see com.sslexplorer.realms.Realm#setType(java.lang.String)
50      */

51     public void setType(String JavaDoc type) {
52         this.type = type;
53     }
54
55     /**
56      * @return boolean
57      */

58     public boolean isHasUserDatabase() {
59         return hasUserDatabase;
60     }
61 }
62
Popular Tags