public abstract class DirectoryLayout extends AbstractSiteData
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<FileServerType.OPERATION,java.util.List<FileServer>> |
mFileServers
The list of file servers that can be used to write to access this directory
indexed by operation type.
|
protected InternalMountPoint |
mInternalMount
The internal mount point for the directory.
|
Constructor and Description |
---|
DirectoryLayout()
The default constructor.
|
DirectoryLayout(DirectoryLayout directory)
The copy constructor
|
DirectoryLayout(java.util.Map<FileServerType.OPERATION,java.util.List<FileServer>> fs,
InternalMountPoint imt)
The overloaded constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addFileServer(FileServer server)
Adds a FileServer that can access this directory.
|
java.lang.Object |
clone()
Returns the clone of the object.
|
java.util.List<FileServer> |
getFileServers(FileServerType.OPERATION operation)
Selects all file servers and returns it matching an operation type.
|
java.util.Iterator<FileServer> |
getFileServersIterator(FileServerType.OPERATION operation)
Returns at iterator to the file servers.
|
InternalMountPoint |
getInternalMountPoint()
Returns the internal mount point for the directory.
|
boolean |
hasFileServerForGETOperations()
A convenience method that retrieves whether the directory has a
file server for get operations ( file server with type get and all )
|
boolean |
hasFileServerForOperations(FileServerType.OPERATION operation)
A convenience method that retrieves whether the directory has a
file server for a particular operation.
|
boolean |
hasFileServerForPUTOperations()
A convenience method that retrieves whether the directory has a
file server for put operations ( file server with type put and all )
|
private void |
initialize()
Initializes the object
|
private void |
initialize(java.util.Map<FileServerType.OPERATION,java.util.List<FileServer>> fs,
InternalMountPoint imt)
Initializes the object
|
boolean |
isEmpty()
A convenience method that returns true if all the attributes values are
uninitialized or empty strings.
|
void |
resetFileServers()
Resets the internal collection of file servers
|
FileServer |
selectFileServer(FileServerType.OPERATION operation)
Selects a random file server and returns it matching an operation type.
|
void |
setFileServers(java.util.List<FileServer> servers)
Sets the list of FileServers that can access this directory.
|
void |
setInternalMountPoint(InternalMountPoint mountPoint)
Sets the internal mount point for the directory.
|
accept, toString, toXML, toXML, writeAttribute
protected java.util.Map<FileServerType.OPERATION,java.util.List<FileServer>> mFileServers
protected InternalMountPoint mInternalMount
public DirectoryLayout()
public DirectoryLayout(DirectoryLayout directory)
public DirectoryLayout(java.util.Map<FileServerType.OPERATION,java.util.List<FileServer>> fs, InternalMountPoint imt)
fs
- map of file servers indexed by FileServer operationimt
- the internal mount point.private void initialize()
private void initialize(java.util.Map<FileServerType.OPERATION,java.util.List<FileServer>> fs, InternalMountPoint imt)
fs
- list of file servers indexed by operation typeimt
- the internal mount point.public void addFileServer(FileServer server)
server
- the file server.public void setFileServers(java.util.List<FileServer> servers)
servers
- the list of serverspublic FileServer selectFileServer(FileServerType.OPERATION operation)
operation
- the operation for which the file server is requiredpublic java.util.List<FileServer> getFileServers(FileServerType.OPERATION operation)
operation
- the operation for which the file server is requiredpublic boolean hasFileServerForGETOperations()
public boolean hasFileServerForPUTOperations()
public boolean hasFileServerForOperations(FileServerType.OPERATION operation)
operation
- the operation for which we need the file serverspublic java.util.Iterator<FileServer> getFileServersIterator(FileServerType.OPERATION operation)
public void setInternalMountPoint(InternalMountPoint mountPoint)
mountPoint
- the internal mount point.public InternalMountPoint getInternalMountPoint()
public boolean isEmpty()
public void resetFileServers()
public java.lang.Object clone()
clone
in class AbstractSiteData