KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejbca > ui > web > admin > services > servicetypes > ServiceType


1 /*************************************************************************
2  * *
3  * EJBCA: The OpenSource Certificate Authority *
4  * *
5  * This software is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU Lesser General Public *
7  * License as published by the Free Software Foundation; either *
8  * version 2.1 of the License, or any later version. *
9  * *
10  * See terms of license at gnu.org. *
11  * *
12  *************************************************************************/

13 package org.ejbca.ui.web.admin.services.servicetypes;
14
15 import java.io.IOException JavaDoc;
16 import java.io.Serializable JavaDoc;
17 import java.util.ArrayList JavaDoc;
18 import java.util.Properties JavaDoc;
19
20 /**
21  * Abstract base class of all type of service components. Used to manages
22  * available and compatible JSF SubViews
23  *
24  * @author Philip Vendil 2006 sep 29
25  *
26  * @version $Id: ServiceType.java,v 1.3 2006/10/26 11:02:17 herrvendil Exp $
27  */

28 public abstract class ServiceType implements Serializable JavaDoc{
29     
30     private String JavaDoc jSFSubViewPage;
31     private String JavaDoc name;
32     private boolean translatable;
33
34
35     /**
36      *
37      * @param subViewPage the name og the subViewPage to link in the page
38      * @param name, the name of the page when it is selected in the GUI
39      * @param translatable if the name should be looked up in the resource files or not.
40      */

41     public ServiceType(String JavaDoc subViewPage, String JavaDoc name, boolean translatable) {
42         super();
43         jSFSubViewPage = subViewPage;
44         this.name = name;
45         this.translatable = translatable;
46     }
47
48     /**
49      * @return the name og the subViewPage to link in the page
50      */

51     public String JavaDoc getJSFSubViewPage() {
52         return jSFSubViewPage;
53     }
54
55     /**
56      * @return the name of the page when it is selected in the GUI
57      */

58     public String JavaDoc getName() {
59         return name;
60     }
61
62     /**
63      * @return if the name should be looked up in the resource files or not.
64      */

65     public boolean isTranslatable() {
66         return translatable;
67     }
68     
69     /**
70      * All implementing classes should populate the properties
71      * @return
72      */

73     public abstract Properties JavaDoc getProperties(ArrayList JavaDoc errorMessages) throws IOException JavaDoc;
74     
75     /**
76      * All implementing classes should populate the gui data
77      * @return
78      */

79     public abstract void setProperties(Properties JavaDoc properties) throws IOException JavaDoc;
80     
81     /**
82      * The classPath of the component in the model
83      */

84     public abstract String JavaDoc getClassPath();
85     
86     /**
87      * Return true if this type is a custom type
88      */

89     public abstract boolean isCustom();
90 }
91
Popular Tags