|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.entityfs.util.cap.fs.FSCFileResolvableUtil
public final class FSCFileResolvableUtil
This utility class contains static methods for working with file systems that
support the FSCFileResolvable
file system capability.
FSCFileResolvable
Method Summary | |
---|---|
static FSCFileResolvable |
getCapability(FileSystem fs)
Get the capability object for the file system. |
static Entity |
getEntityForFile(FileSystem fs,
File f)
Get the entity referenced by the java.io.File object. |
static AbsoluteLocation |
getEntityLocationForFile(FileSystem fs,
File f)
Get the absolute entity location referenced by the java.io.File
object. |
static File |
getFileForEntity(EntityView ev)
Get a java.io.File object that references the supplied entity. |
static File |
getFileForFileSystemRoot(FileSystem fs)
Get a java.io.File object that references the file system root in
the backing file system. |
static boolean |
supportsCapability(FileSystem fs)
Check if the file system supports the FSCFileResolvable
capability. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean supportsCapability(FileSystem fs)
FSCFileResolvable
capability.
fs
- The file system
true
if the file system supports the capability, false
if not.public static FSCFileResolvable getCapability(FileSystem fs) throws UnsupportedCapabilityException
fs
- The file system.
UnsupportedCapabilityException
- If the file system does not
support the FSCFileResolvable
capability.public static File getFileForFileSystemRoot(FileSystem fs) throws UnsupportedCapabilityException
java.io.File
object that references the file system root in
the backing file system.
fs
- The file system.
java.io.File
object referencing the file system root.
UnsupportedCapabilityException
- If the file system does not
support the FSCFileResolvable
capability.FSCFileResolvable.getFileForFileSystemRoot()
public static File getFileForEntity(EntityView ev) throws UnsupportedCapabilityException
java.io.File
object that references the supplied entity.
ev
- The entity to get the File
object for.
File
object that is referencing the entity.
UnsupportedCapabilityException
- If the file system does not
support the FSCFileResolvable
capability.public static AbsoluteLocation getEntityLocationForFile(FileSystem fs, File f) throws UnsupportedCapabilityException, EntityNotFoundException
java.io.File
object. The file object must reference a location within the file system.
fs
- The file system.f
- The file.
UnsupportedCapabilityException
- If the file system does not
support the FSCFileResolvable
capability.
EntityNotFoundException
- If the file does not reference a location
within the file system.FSCFileResolvable.getEntityLocationForFile(File)
,
getEntityForFile(FileSystem, File)
public static Entity getEntityForFile(FileSystem fs, File f) throws UnsupportedCapabilityException, EntityNotFoundException
java.io.File
object. The file
object must reference an entity within the supplied file system.
This method will temporarily acquire read locks on all entities from the file system's root directory to the requested entity's parent directory.
fs
- The file system.f
- The file.
UnsupportedCapabilityException
- If the file system does not
support the FSCFileResolvable
capability.
EntityNotFoundException
- If the file does not reference an entity
within the file system.getEntityLocationForFile(FileSystem, File)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |