1 18 19 package sync4j.syncclient.spdm; 20 21 35 36 public class SimpleDeviceManager extends DeviceManager { 37 38 40 43 public static final String PROP_DM_DIR_BASE = "spdm.dir.base"; 44 45 46 50 52 54 private String baseDir = null; 55 56 58 61 public SimpleDeviceManager() { 62 baseDir = System.getProperty(PROP_DM_DIR_BASE, "./"); 63 64 if (!baseDir.endsWith("/")) { 68 baseDir += '/'; 69 } 70 } 71 73 78 public static DeviceManager getDeviceManager(){ 79 return (DeviceManager) new SimpleDeviceManager(); 80 } 81 82 90 public ManagementNode getManagementTree(String context){ 91 return new NodeImpl(null, baseDir + context); 92 } 93 94 99 public ManagementNode getManagementTree(){ 100 return getManagementTree(""); 101 } 102 103 public Device getDevice() { 104 return new DeviceImpl(this); 105 } 106 107 } | Popular Tags |