org.olat.core.util.coordinate.filer
Class DirectoryImpl

java.lang.Object
  extended by org.olat.core.util.coordinate.filer.DirectoryImpl
All Implemented Interfaces:
Directory

Deprecated. work in progress

Initial Date: 12.11.2007

public class DirectoryImpl
extends java.lang.Object
implements Directory

Description:

Author:
Felix Jost, http://www.goodsolutions.ch

Method Summary
 void delete()
          Deprecated. deletes this directory, including all directories "below" which were created using getDirectoryFor(OLATResourceable ores).
 Directory getDirectoryFor(OLATResourceable ores)
          Deprecated. returns a Directory object which represents the complete namespace reached.
 java.io.File getFileSystemDirectory()
          Deprecated. creates if needed and returns the java.io.File that is associated to the current Directory object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

delete

public void delete()
Deprecated. 
Description copied from interface: Directory
deletes this directory, including all directories "below" which were created using getDirectoryFor(OLATResourceable ores). The deletion of all data is postponed until the associated transaction is committed. In case of a rollback, nothing is done.

Specified by:
delete in interface Directory

getDirectoryFor

public Directory getDirectoryFor(OLATResourceable ores)
Deprecated. 
Description copied from interface: Directory
returns a Directory object which represents the complete namespace reached. e.g. .getDirectory(coursefactory.class, "coursedata").getDirectory(mycourse).getDirectory(anIdentity) is a Directory which has a structure is meant to be for a certain course and and certain identity.
.getDirectory(coursefactory.class, "coursedata").getDirectory(anIdentity).getDirectory(course) would also be possible.
(the former mapping to a path ..../course_123/identity_456 and the latter to .../identity_456/course_123)
Deleting a directory will delete all subdirectories created out of this Directory.

Specified by:
getDirectoryFor in interface Directory
Parameters:
ores - the olatResourceable
Returns:
the Directory

getFileSystemDirectory

public java.io.File getFileSystemDirectory()
Deprecated. 
Description copied from interface: Directory
creates if needed and returns the java.io.File that is associated to the current Directory object. In order to guarantee to the namespaces are independent of each other, it is important that the user must not use
a) the absolute path of the file
b) the getParent() function to obtain a parent file(name).
cluster::: is this sufficient? the olat vfs could have been used here, but it first needs to be improved a bit.

Specified by:
getFileSystemDirectory in interface Directory
Returns:
the File associated with this Directory.