1 17 package org.alfresco.filesys.server.filesys; 18 19 import org.alfresco.filesys.server.core.DeviceInterface; 20 import org.alfresco.filesys.server.core.ShareType; 21 import org.alfresco.filesys.server.core.SharedDevice; 22 23 27 public class DiskSharedDevice extends SharedDevice 28 { 29 30 37 public DiskSharedDevice(String name, DeviceInterface iface, DiskDeviceContext ctx) 38 { 39 super(name, ShareType.DISK, ctx); 40 setInterface(iface); 41 } 42 43 51 public DiskSharedDevice(String name, DeviceInterface iface, DiskDeviceContext ctx, int attrib) 52 { 53 super(name, ShareType.DISK, ctx); 54 setInterface(iface); 55 setAttributes(attrib); 56 } 57 58 63 public final DiskDeviceContext getDiskContext() 64 { 65 return (DiskDeviceContext) getContext(); 66 } 67 68 73 public final DiskInterface getDiskInterface() 74 { 75 try 76 { 77 if (getInterface() instanceof DiskInterface) 78 return (DiskInterface) getInterface(); 79 } 80 catch (Exception ex) 81 { 82 } 83 return null; 84 } 85 } | Popular Tags |