1 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 15 19 public class ExecutionType implements StatusConstants { 20 private String _type; 21 22 23 public ExecutionType() { 24 _type = TYPE_UNKNOWN; 25 } 26 27 public String getExecutionType() { 28 return _type; 29 } 30 31 void setExecutionType(String 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 toString() { 46 return _type; 47 } 48 } | Popular Tags |