| 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.apache.lenya.cms.rc.RCML
public class RCML
Handle with the RCML file
| Field Summary | |
|---|---|
static short | 
ci
 | 
static short | 
co
 | 
protected static java.lang.String | 
ELEMENT_BACKUP
 | 
protected static java.lang.String | 
ELEMENT_CHECKIN
 | 
protected static java.lang.String | 
ELEMENT_CHECKOUT
 | 
| Constructor Summary | |
|---|---|
RCML()
Creates a new RCML object.  | 
|
RCML(java.lang.String rcmlDirectory,
     java.lang.String filename,
     java.lang.String rootDirectory)
create a RCML-File if no one exists already  | 
|
| Method Summary | |
|---|---|
 void | 
checkOutIn(short type,
           java.lang.String identity,
           long time,
           boolean backup)
Write a new entry for a check out or a check in the RCML-File made by the user with identity at time  | 
protected  void | 
clearDirty()
Set the value dirty to false  | 
 boolean | 
delete()
delete the rcml file and the directory if this one is empty  | 
 void | 
deleteFirstCheckIn()
Delete the latest check in  | 
protected  void | 
finalize()
Call the methode write, if the document is dirty  | 
 java.lang.String[] | 
getBackupsTime()
get the time's value of the backups  | 
 org.w3c.dom.Document | 
getDOMDocumentClone()
Get a clone document  | 
 java.util.Vector | 
getEntries()
get all check in and check out  | 
 CheckInEntry | 
getLatestCheckInEntry()
get the latest check in  | 
 CheckOutEntry | 
getLatestCheckOutEntry()
get the latest check out  | 
 RCMLEntry | 
getLatestEntry()
get the latest entry (a check out or check in)  | 
 void | 
initDocument()
initialise the RCML-document.  | 
 boolean | 
isDirty()
Check if the document is dirty  | 
 void | 
pruneEntries(java.lang.String backupDir)
Prune the list of entries and delete the corresponding backups.  | 
protected  void | 
setDirty()
Set the value dirty to true  | 
 void | 
write()
Write the xml RCML-document in the RCML-file.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final short co
public static final short ci
protected static final java.lang.String ELEMENT_CHECKIN
protected static final java.lang.String ELEMENT_CHECKOUT
protected static final java.lang.String ELEMENT_BACKUP
| Constructor Detail | 
|---|
public RCML()
public RCML(java.lang.String rcmlDirectory,
            java.lang.String filename,
            java.lang.String rootDirectory)
     throws java.lang.Exception
rcmlDirectory - The rcml directory.filename - The path of the file from the publication (e.g. for file with 
 absolute path home/.../jakarta-tomcat-4.1.24/webapps/lenya/lenya/pubs/{publication id}/content/authoring/foo/bar.xml
 the filename is content/authoring/foo/bar.xml)rootDirectory - The publication directory
java.lang.Exception - if an error occurs| Method Detail | 
|---|
public void initDocument()
                  throws javax.xml.parsers.ParserConfigurationException
javax.xml.parsers.ParserConfigurationException
protected void finalize()
                 throws java.io.IOException,
                        java.lang.Exception
finalize in class java.lang.Objectjava.io.IOException - if an error occurs
java.lang.Exception - if an error occurs
public void write()
           throws java.io.IOException,
                  java.lang.Exception
java.io.IOException - if an error occurs
java.lang.Exception - if an error occurs
public void checkOutIn(short type,
                       java.lang.String identity,
                       long time,
                       boolean backup)
                throws java.io.IOException,
                       java.lang.Exception
type - co for a check out, ci for a check inidentity - The identity of the usertime - Time at which the check in/out is made
java.io.IOException - if an error occurs
java.lang.Exception - if an error occurs
public CheckOutEntry getLatestCheckOutEntry()
                                     throws java.lang.Exception
java.lang.Exception - if an error occurs
public CheckInEntry getLatestCheckInEntry()
                                   throws java.lang.Exception
java.lang.Exception - if an error occurs
public RCMLEntry getLatestEntry()
                         throws java.lang.Exception
java.lang.Exception - if an error occurs
public java.util.Vector getEntries()
                            throws java.lang.Exception
java.lang.Exception - if an error occurs
public void pruneEntries(java.lang.String backupDir)
                  throws java.lang.Exception
backupDir - The backup directory
java.lang.Exception - if an error occurs
public org.w3c.dom.Document getDOMDocumentClone()
                                         throws java.lang.Exception
java.lang.Exception - if an error occurspublic boolean isDirty()
protected void setDirty()
protected void clearDirty()
public void deleteFirstCheckIn()
                        throws java.lang.Exception
java.lang.Exception - if an error occurs
public java.lang.String[] getBackupsTime()
                                  throws java.lang.Exception
java.lang.Exception - if an error occurspublic boolean delete()
  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||