|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.lenya.cms.rc.RevisionController
public class RevisionController
Controller for the reserved check-in, check-out, the backup versions and the rollback.
Field Summary | |
---|---|
static java.lang.String |
systemUsername
|
Constructor Summary | |
---|---|
RevisionController()
Creates a new RevisionController object. |
|
RevisionController(java.lang.String rootDir)
Creates a new RevisionController object. |
|
RevisionController(java.lang.String rcmlDirectory,
java.lang.String backupDirectory,
java.lang.String rootDirectory)
Creates a new RevisionController object. |
Method Summary | |
---|---|
boolean |
canCheckOut(java.lang.String source,
java.lang.String identity)
Deprecated. please use canCheckOut(Document, String) Checks if a source can be checked out. |
void |
deleteRCML(java.lang.String filename)
Deprecated. please use deleteRCML(Document) delete the rcml file |
void |
deleteRevisions(java.lang.String filename)
Deprecated. please use deleteRevisions(Document) delete the revisions |
java.io.File |
getBackupFile(long time,
java.lang.String filename)
Deprecated. getBackupFile(long, Document) Get the file of a backup version |
java.lang.String |
getBackupFilename(long time,
java.lang.String filename)
Get the absolute path of a backup version |
RCML |
getRCML(java.lang.String source)
Deprecated. please use getRCML(Document doc) Get the RCML File for the file source |
long |
reservedCheckIn(java.lang.String destination,
java.lang.String identity,
boolean backup)
Deprecated. please use reservedCheckIn(Document, String, boolean) Try to make a reserved check in of the file destination for a user with identity. A backup copy can be made. |
java.io.File |
reservedCheckOut(java.lang.String source,
java.lang.String identity)
Deprecated. reservedCheckOut(Document, String) Try to make a reserved check out of the file source for a user with identity |
long |
rollback(java.lang.String destination,
java.lang.String identity,
boolean backupFlag,
long time)
Deprecated. please use rollback(Document, String, boolean, long) Rolls back to the given point in time. |
java.lang.String |
toString()
Shows Configuration |
void |
undoCheckIn(long time,
java.lang.String destination)
Delete the check in and roll back the file to the backup at time |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String systemUsername
Constructor Detail |
---|
public RevisionController()
public RevisionController(java.lang.String rcmlDirectory, java.lang.String backupDirectory, java.lang.String rootDirectory)
rcmlDirectory
- The directory for the RCML filesbackupDirectory
- The directory for the backup versionsrootDirectory
- The publication directorypublic RevisionController(java.lang.String rootDir)
rootDir
- The publication directoryMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public RCML getRCML(java.lang.String source) throws java.io.FileNotFoundException, java.io.IOException, java.lang.Exception
source
- The path of the file from the publication.
java.io.FileNotFoundException
- if an error occurs
java.io.IOException
- if an error occurs
java.lang.Exception
- if an error occurspublic java.io.File reservedCheckOut(java.lang.String source, java.lang.String identity) throws java.lang.Exception
source
- The filename of the file to check outidentity
- The identity of the user
java.lang.Exception
- if an error occurspublic boolean canCheckOut(java.lang.String source, java.lang.String identity) throws java.lang.Exception
source
- The source.identity
- The identity who requests checking out.
java.lang.Exception
- when something went wrong.public long reservedCheckIn(java.lang.String destination, java.lang.String identity, boolean backup) throws FileReservedCheckInException, java.lang.Exception
destination
- The file we want to check inidentity
- The identity of the userbackup
- if true, a backup will be created, else no backup will be made.
FileReservedCheckInException
- if the document couldn't be checked in (for instance
because it is already checked out by someone other ...)
java.lang.Exception
- if other problems occurpublic java.lang.String getBackupFilename(long time, java.lang.String filename)
time
- The time of the backupfilename
- The path of the file from the {publication}
public java.io.File getBackupFile(long time, java.lang.String filename)
time
- The time of the backupfilename
- The path of the file from the {publication}
public long rollback(java.lang.String destination, java.lang.String identity, boolean backupFlag, long time) throws FileReservedCheckInException, FileReservedCheckOutException, java.io.FileNotFoundException, java.lang.Exception
destination
- File which will be rolled backidentity
- The identity of the userbackupFlag
- If true, a backup of the current version will be made before the rollbacktime
- The time point of the desired version
FileReservedCheckInException
- if the current version couldn't be checked in again
FileReservedCheckOutException
- if the current version couldn't be checked out
java.io.FileNotFoundException
- if a file couldn't be found
java.lang.Exception
- if another problem occurspublic void undoCheckIn(long time, java.lang.String destination) throws java.lang.Exception
time
- The time point of the back version we want to retrievedestination
- The File for which we want undo the check in
java.lang.Exception
- FileNotFoundException if the back version or the current version
couldn't be foundpublic void deleteRevisions(java.lang.String filename) throws RevisionControlException
filename
- of the document
RevisionControlException
- when somthing went wrongpublic void deleteRCML(java.lang.String filename) throws RevisionControlException
filename
- of the document
RevisionControlException
- if something went wrong
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |