KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > config > backup > utils > FactoryHelper


1 /*
2  * BackupHelper.java
3  *
4  * Created on December 22, 2003, 10:04 PM
5  */

6
7 package com.sun.enterprise.config.backup.utils;
8
9 //remove dependency
10
import com.sun.enterprise.config.backup.status.BackupStatus;
11
12
13 import com.sun.enterprise.config.backup.status.Status;
14 import com.sun.enterprise.config.backup.status.StatusConstants;
15 import com.sun.enterprise.config.backup.pluggable.BackupEnvironment;
16 import com.sun.enterprise.config.backup.pluggable.ActiveAssistance;
17 import com.sun.enterprise.config.backup.pluggable.EnvironmentFactory;
18 import com.sun.enterprise.config.backup.pluggable.BackupSynchronizer;
19 import com.sun.enterprise.config.backup.pluggable.BackupStorage;
20 import com.sun.enterprise.config.backup.HistoryManager;
21 import com.sun.enterprise.config.backup.EnvironmentConstants;
22 import com.sun.enterprise.config.backup.DefaultConstants;
23 import com.sun.enterprise.config.backup.BackupException;
24 import com.sun.enterprise.config.backup.BackupStorageMonitor;
25 import com.sun.enterprise.config.backup.StorageMonitor;
26 import com.sun.enterprise.config.backup.SnapShotStorageMonitor;
27 import com.sun.enterprise.config.backup.FeatureFactory;
28 import java.io.File JavaDoc;
29 /**
30  *
31  * @author sridatta
32  */

33 public class FactoryHelper implements EnvironmentConstants {
34     
35     /** Creates a new instance of BackupHelper */
36     public FactoryHelper() {
37     }
38      
39     public static BackupEnvironment getEnv() {
40         return getFactory().getBackupEnvironment();
41     }
42     
43      public static ActiveAssistance getAssistance() {
44         return getFactory().getActiveAssistance();
45     }
46     
47     public static EnvironmentFactory getFactory() {
48         return EnvironmentFactory.getEnvironmentFactory();
49     }
50  
51     public static BackupSynchronizer getSynchronizer() {
52         return getFactory().getBackupSynchronizer();
53     }
54     public static BackupStorage getStorage() {
55         return getFactory().getBackupStorage();
56     }
57     public static HistoryManager getHistoryManager()
58                                     throws BackupException {
59         return FeatureFactory.getHistoryManager();
60     }
61 /* public static BackupDeleteHandler getBackupDeleteHandler() {
62         return FeatureFactory.getBackupDeleteHandler();
63     }
64  */

65     public static BackupStorageMonitor getBackupStorageMonitor()
66                                 throws BackupException {
67         return FeatureFactory.getBackupStorageMonitor();
68     }
69     public static SnapShotStorageMonitor getSnapShotStorageMonitor() throws BackupException {
70         return FeatureFactory.getSnapShotStorageMonitor();
71     }
72 }
73
Popular Tags