KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > config > backup > status > ExecutionType


1 /*
2  * StatusCode.java
3  *
4  * Created on December 13, 2000, 6:32 AM
5  */

6
7 package com.sun.enterprise.config.backup.status;
8
9 import com.sun.enterprise.config.backup.BackupException;
10 import com.sun.enterprise.config.backup.utils.LocalStringsHelper;
11
12 //import i18n UTIL
13
//TBD FIXME
14

15 /**
16  *
17  * @author sridatta
18  */

19 public class ExecutionType implements StatusConstants {
20     private String JavaDoc _type;
21     
22     /** Creates a new instance of StatusCode */
23     public ExecutionType() {
24         _type = TYPE_UNKNOWN;
25     }
26     
27     public String JavaDoc getExecutionType() {
28         return _type;
29     }
30     
31     void setExecutionType(String JavaDoc type) throws BackupException {
32         if(type != TYPE_OFFLINE &&
33                     type != TYPE_ONLINE) {
34             throw new BackupException
35                 ("config_backup_wrong_execution_type", LocalStringsHelper.getString
36                     ("config_backup_wrong_execution_type", type));
37         }
38         _type = type;
39     }
40     
41     public boolean isOnline() {
42         return (_type == TYPE_ONLINE);
43     }
44     
45     public String JavaDoc toString() {
46         return _type;
47     }
48 }
Popular Tags