|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.lenya.cms.repository.SourceNodeRCML
public class SourceNodeRCML
Handle with the RCML file
Field Summary | |
---|---|
protected static java.lang.String |
ATTR_BACKUP
|
protected static java.lang.String |
ATTR_IDENTITY
|
protected static java.lang.String |
ATTR_SESSION
|
protected static java.lang.String |
ATTR_TIME
|
protected static java.lang.String |
ATTR_VERSION
|
protected static java.lang.String |
ELEMENT_BACKUP
|
protected static java.lang.String |
ELEMENT_CHECKIN
|
protected static java.lang.String |
ELEMENT_CHECKOUT
|
protected static java.lang.String |
ELEMENT_IDENTITY
|
protected static java.lang.String |
ELEMENT_SESSION
|
protected static java.lang.String |
ELEMENT_TIME
|
protected static java.lang.String |
ELEMENT_VERSION
|
protected static java.lang.String |
ELEMENT_XPSREVISIONCONTROL
|
protected static java.lang.String |
NAMESPACE
|
protected static java.lang.String |
RCML_EXTENSION
|
Fields inherited from interface org.apache.lenya.cms.rc.RCML |
---|
ci, co |
Constructor Summary | |
---|---|
SourceNodeRCML(java.lang.String contentSourceUri,
java.lang.String metaSourceUri,
org.apache.avalon.framework.service.ServiceManager manager)
|
Method Summary | |
---|---|
void |
checkIn(org.apache.lenya.cms.repository.Node node,
boolean backup,
boolean newVersion)
|
void |
checkOut(org.apache.lenya.cms.repository.Node node)
|
void |
checkOut(org.apache.lenya.cms.repository.Node node,
boolean restrictedToSession)
|
void |
checkOutIn(org.apache.lenya.cms.repository.Node node,
short type,
long time,
boolean backup,
boolean newVersion,
boolean restrictedToSession)
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 |
void |
copyFrom(org.apache.lenya.cms.repository.Node node,
org.apache.lenya.cms.repository.Node otherNode)
|
boolean |
delete()
Delete the revisions, the RCML source and the collection if the latter is empty. |
protected void |
deleteBackup(java.lang.String sourceUri,
long time)
|
void |
deleteRevisions()
delete the revisions |
protected void |
finalize()
Call the method write, if the document is dirty |
java.util.Vector |
getBackupEntries()
get all backup entries |
protected java.lang.String |
getBackupSourceUri(SourceWrapper wrapper,
long time)
|
protected java.lang.String |
getBackupSourceUri(java.lang.String uri,
long time)
|
java.lang.String[] |
getBackupsTime()
get the time's value of the backups |
protected java.lang.String |
getChildValue(org.apache.lenya.xml.NamespaceHelper helper,
org.w3c.dom.Element element,
java.lang.String childName)
|
protected java.lang.String |
getChildValue(org.apache.lenya.xml.NamespaceHelper helper,
org.w3c.dom.Element element,
java.lang.String childName,
java.lang.String defaultValue)
|
java.util.Vector |
getEntries()
get all check in and check out |
protected org.apache.lenya.cms.rc.RCMLEntry |
getEntry(org.apache.lenya.xml.NamespaceHelper helper,
org.w3c.dom.Element element)
|
org.apache.lenya.cms.rc.CheckInEntry |
getLatestCheckInEntry()
get the latest check in |
org.apache.lenya.cms.rc.CheckOutEntry |
getLatestCheckOutEntry()
get the latest check out |
protected org.w3c.dom.Element |
getLatestElement(org.apache.lenya.xml.NamespaceHelper helper,
java.lang.String type)
|
org.apache.lenya.cms.rc.RCMLEntry |
getLatestEntry()
|
org.apache.lenya.cms.rc.RCMLEntry |
getLatestEntry(short type)
get the latest entry (a check out or check in) |
protected org.apache.lenya.cms.rc.RCMLEntry |
getLegacyEntry(org.apache.lenya.xml.NamespaceHelper helper,
org.w3c.dom.Element element)
|
protected java.lang.String |
getRcmlSourceUri()
|
boolean |
isCheckedOut()
|
boolean |
isCheckedOutBySession(org.apache.lenya.cms.repository.Session session)
|
boolean |
isDirty()
Check if the document is dirty |
void |
makeBackup(long time)
|
protected void |
makeBackup(java.lang.String sourceUri,
long time)
|
void |
pruneEntries()
Prune the list of entries and delete the corresponding backups. |
void |
restoreBackup(org.apache.lenya.cms.repository.Node node,
long time)
|
protected void |
restoreBackup(SourceWrapper wrapper,
long time)
|
protected org.apache.lenya.xml.NamespaceHelper |
saveToXml()
|
protected org.w3c.dom.Element |
saveToXml(org.apache.lenya.xml.NamespaceHelper helper,
org.apache.lenya.cms.rc.RCMLEntry entry)
|
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 |
---|
protected static final java.lang.String NAMESPACE
protected static final java.lang.String ELEMENT_CHECKIN
protected static final java.lang.String ELEMENT_CHECKOUT
protected static final java.lang.String ELEMENT_BACKUP
protected static final java.lang.String ELEMENT_TIME
protected static final java.lang.String ELEMENT_VERSION
protected static final java.lang.String ELEMENT_IDENTITY
protected static final java.lang.String ELEMENT_XPSREVISIONCONTROL
protected static final java.lang.String ELEMENT_SESSION
protected static final java.lang.String ATTR_BACKUP
protected static final java.lang.String ATTR_TIME
protected static final java.lang.String ATTR_VERSION
protected static final java.lang.String ATTR_IDENTITY
protected static final java.lang.String ATTR_SESSION
protected static final java.lang.String RCML_EXTENSION
Constructor Detail |
---|
public SourceNodeRCML(java.lang.String contentSourceUri, java.lang.String metaSourceUri, org.apache.avalon.framework.service.ServiceManager manager)
contentSourceUri
- The content source URI.metaSourceUri
- The meta source URI.manager
- The service manager.Method Detail |
---|
protected java.lang.String getRcmlSourceUri()
protected void finalize() throws java.io.IOException, java.lang.Exception
finalize
in class java.lang.Object
java.io.IOException
- if an error occurs
java.lang.Exception
- if an error occurspublic void write() throws org.apache.lenya.cms.rc.RevisionControlException
org.apache.lenya.cms.rc.RevisionControlException
- if an error occurspublic void checkOutIn(org.apache.lenya.cms.repository.Node node, short type, long time, boolean backup, boolean newVersion, boolean restrictedToSession) throws org.apache.lenya.cms.rc.RevisionControlException
node
- The node.type
- co for a check out, ci for a check intime
- backup
- Create backup element (only considered for check-in entries).newVersion
- If the revision number shall be increased (only considered for check-in
entries).restrictedToSession
- If the check-out is restricted to the session (only considered for
check-out entries).
org.apache.lenya.cms.rc.RevisionControlException
- if an error occursprotected org.w3c.dom.Element saveToXml(org.apache.lenya.xml.NamespaceHelper helper, org.apache.lenya.cms.rc.RCMLEntry entry) throws org.apache.lenya.cms.rc.RevisionControlException
org.apache.lenya.cms.rc.RevisionControlException
protected org.apache.lenya.xml.NamespaceHelper saveToXml() throws org.apache.lenya.cms.rc.RevisionControlException
org.apache.lenya.cms.rc.RevisionControlException
protected org.w3c.dom.Element getLatestElement(org.apache.lenya.xml.NamespaceHelper helper, java.lang.String type) throws org.apache.lenya.cms.rc.RevisionControlException
org.apache.lenya.cms.rc.RevisionControlException
public org.apache.lenya.cms.rc.CheckOutEntry getLatestCheckOutEntry() throws org.apache.lenya.cms.rc.RevisionControlException
getLatestCheckOutEntry
in interface org.apache.lenya.cms.rc.RCML
org.apache.lenya.cms.rc.RevisionControlException
- if an error occurspublic org.apache.lenya.cms.rc.CheckInEntry getLatestCheckInEntry() throws org.apache.lenya.cms.rc.RevisionControlException
getLatestCheckInEntry
in interface org.apache.lenya.cms.rc.RCML
org.apache.lenya.cms.rc.RevisionControlException
- if an error occurspublic org.apache.lenya.cms.rc.RCMLEntry getLatestEntry(short type) throws org.apache.lenya.cms.rc.RevisionControlException
type
- The type.
org.apache.lenya.cms.rc.RevisionControlException
- if an error occurspublic org.apache.lenya.cms.rc.RCMLEntry getLatestEntry() throws org.apache.lenya.cms.rc.RevisionControlException
getLatestEntry
in interface org.apache.lenya.cms.rc.RCML
org.apache.lenya.cms.rc.RevisionControlException
protected org.apache.lenya.cms.rc.RCMLEntry getEntry(org.apache.lenya.xml.NamespaceHelper helper, org.w3c.dom.Element element)
protected org.apache.lenya.cms.rc.RCMLEntry getLegacyEntry(org.apache.lenya.xml.NamespaceHelper helper, org.w3c.dom.Element element)
protected java.lang.String getChildValue(org.apache.lenya.xml.NamespaceHelper helper, org.w3c.dom.Element element, java.lang.String childName, java.lang.String defaultValue)
protected java.lang.String getChildValue(org.apache.lenya.xml.NamespaceHelper helper, org.w3c.dom.Element element, java.lang.String childName)
public java.util.Vector getEntries() throws org.apache.lenya.cms.rc.RevisionControlException
getEntries
in interface org.apache.lenya.cms.rc.RCML
org.apache.lenya.cms.rc.RevisionControlException
- if an error occurspublic java.util.Vector getBackupEntries() throws java.lang.Exception
getBackupEntries
in interface org.apache.lenya.cms.rc.RCML
java.lang.Exception
- if an error occurspublic void makeBackup(long time) throws org.apache.lenya.cms.rc.RevisionControlException
makeBackup
in interface org.apache.lenya.cms.rc.RCML
org.apache.lenya.cms.rc.RevisionControlException
protected void makeBackup(java.lang.String sourceUri, long time) throws org.apache.lenya.cms.rc.RevisionControlException
org.apache.lenya.cms.rc.RevisionControlException
public void restoreBackup(org.apache.lenya.cms.repository.Node node, long time) throws org.apache.lenya.cms.rc.RevisionControlException
restoreBackup
in interface org.apache.lenya.cms.rc.RCML
org.apache.lenya.cms.rc.RevisionControlException
protected void restoreBackup(SourceWrapper wrapper, long time) throws org.apache.lenya.cms.rc.RevisionControlException
org.apache.lenya.cms.rc.RevisionControlException
protected java.lang.String getBackupSourceUri(SourceWrapper wrapper, long time)
protected java.lang.String getBackupSourceUri(java.lang.String uri, long time)
public void pruneEntries() throws org.apache.lenya.cms.rc.RevisionControlException
pruneEntries
in interface org.apache.lenya.cms.rc.RCML
org.apache.lenya.cms.rc.RevisionControlException
- if an error occursprotected void deleteBackup(java.lang.String sourceUri, long time) throws org.apache.lenya.cms.rc.RevisionControlException
org.apache.lenya.cms.rc.RevisionControlException
public boolean isDirty()
isDirty
in interface org.apache.lenya.cms.rc.RCML
protected void setDirty()
protected void clearDirty()
public java.lang.String[] getBackupsTime() throws java.lang.Exception
getBackupsTime
in interface org.apache.lenya.cms.rc.RCML
java.lang.Exception
- if an error occurspublic boolean delete()
delete
in interface org.apache.lenya.cms.rc.RCML
public void deleteRevisions() throws org.apache.lenya.cms.rc.RevisionControlException
deleteRevisions
in interface org.apache.lenya.cms.rc.RCML
org.apache.lenya.cms.rc.RevisionControlException
- when somthing went wrongpublic void copyFrom(org.apache.lenya.cms.repository.Node node, org.apache.lenya.cms.repository.Node otherNode) throws org.apache.lenya.cms.rc.RevisionControlException
copyFrom
in interface org.apache.lenya.cms.rc.RCML
org.apache.lenya.cms.rc.RevisionControlException
public boolean isCheckedOut() throws org.apache.lenya.cms.rc.RevisionControlException
isCheckedOut
in interface org.apache.lenya.cms.rc.RCML
org.apache.lenya.cms.rc.RevisionControlException
public void checkIn(org.apache.lenya.cms.repository.Node node, boolean backup, boolean newVersion) throws org.apache.lenya.cms.rc.RevisionControlException
checkIn
in interface org.apache.lenya.cms.rc.RCML
org.apache.lenya.cms.rc.RevisionControlException
public void checkOut(org.apache.lenya.cms.repository.Node node) throws org.apache.lenya.cms.rc.RevisionControlException
checkOut
in interface org.apache.lenya.cms.rc.RCML
org.apache.lenya.cms.rc.RevisionControlException
public void checkOut(org.apache.lenya.cms.repository.Node node, boolean restrictedToSession) throws org.apache.lenya.cms.rc.RevisionControlException
checkOut
in interface org.apache.lenya.cms.rc.RCML
org.apache.lenya.cms.rc.RevisionControlException
public boolean isCheckedOutBySession(org.apache.lenya.cms.repository.Session session) throws org.apache.lenya.cms.rc.RevisionControlException
isCheckedOutBySession
in interface org.apache.lenya.cms.rc.RCML
org.apache.lenya.cms.rc.RevisionControlException
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |