org.apache.lenya.cms.repository
Class SourceNode
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.lenya.cms.repository.SourceNode
- All Implemented Interfaces:
- org.apache.avalon.framework.logger.LogEnabled, org.apache.lenya.cms.metadata.MetaDataOwner, org.apache.lenya.cms.repository.ContentHolder, org.apache.lenya.cms.repository.Node, org.apache.lenya.cms.repository.RepositoryItem, org.apache.lenya.transaction.Lockable, org.apache.lenya.transaction.Transactionable, org.apache.lenya.transaction.Versionable
public class SourceNode
- extends org.apache.avalon.framework.logger.AbstractLogEnabled
- implements org.apache.lenya.cms.repository.Node, org.apache.lenya.transaction.Transactionable
A repository node.
- Version:
- $Id: SourceNode.java 575297 2007-09-13 12:50:13Z andreas $
Field Summary |
protected org.apache.avalon.framework.service.ServiceManager |
manager
|
Fields inherited from interface org.apache.lenya.cms.repository.Node |
IDENTIFIABLE_TYPE, LENYA_PROTOCOL |
Constructor Summary |
SourceNode(org.apache.lenya.cms.repository.Session session,
java.lang.String sourceUri,
org.apache.avalon.framework.service.ServiceManager manager,
org.apache.avalon.framework.logger.Logger logger)
Ctor. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
manager
protected org.apache.avalon.framework.service.ServiceManager manager
SourceNode
public SourceNode(org.apache.lenya.cms.repository.Session session,
java.lang.String sourceUri,
org.apache.avalon.framework.service.ServiceManager manager,
org.apache.avalon.framework.logger.Logger logger)
- Ctor.
- Parameters:
session
- sourceUri
- manager
- logger
-
getContentSource
protected ContentSourceWrapper getContentSource()
getMetaSource
protected MetaSourceWrapper getMetaSource()
deleteTransactionable
public void deleteTransactionable()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
deleteTransactionable
in interface org.apache.lenya.transaction.Transactionable
- Throws:
org.apache.lenya.cms.repository.RepositoryException
- See Also:
Transactionable.deleteTransactionable()
getUserId
protected java.lang.String getUserId()
checkin
public void checkin()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
checkin
in interface org.apache.lenya.cms.repository.Node
- Specified by:
checkin
in interface org.apache.lenya.transaction.Versionable
- Throws:
org.apache.lenya.cms.repository.RepositoryException
- See Also:
Versionable.checkin()
forceCheckIn
public void forceCheckIn()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
forceCheckIn
in interface org.apache.lenya.cms.repository.Node
- Throws:
org.apache.lenya.cms.repository.RepositoryException
isCheckedOut
public boolean isCheckedOut()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
isCheckedOut
in interface org.apache.lenya.cms.repository.Node
- Specified by:
isCheckedOut
in interface org.apache.lenya.transaction.Versionable
- Throws:
org.apache.lenya.cms.repository.RepositoryException
- See Also:
Versionable.isCheckedOut()
isCheckedOutBySession
public boolean isCheckedOutBySession(org.apache.lenya.cms.repository.Session session)
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
isCheckedOutBySession
in interface org.apache.lenya.cms.repository.Node
- Throws:
org.apache.lenya.cms.repository.RepositoryException
checkout
public void checkout(boolean restrictedToSession)
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
checkout
in interface org.apache.lenya.cms.repository.Node
- Throws:
org.apache.lenya.cms.repository.RepositoryException
checkout
public void checkout()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
checkout
in interface org.apache.lenya.cms.repository.Node
- Specified by:
checkout
in interface org.apache.lenya.transaction.Versionable
- Throws:
org.apache.lenya.cms.repository.RepositoryException
hasChanged
public boolean hasChanged()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
hasChanged
in interface org.apache.lenya.transaction.Versionable
- Throws:
org.apache.lenya.cms.repository.RepositoryException
- See Also:
Versionable.hasChanged()
getCurrentRevisionNumber
protected int getCurrentRevisionNumber()
throws org.apache.lenya.cms.repository.RepositoryException
- Throws:
org.apache.lenya.cms.repository.RepositoryException
getDocumentNode
protected org.apache.lenya.cms.repository.Node getDocumentNode()
throws org.apache.avalon.framework.service.ServiceException,
org.apache.lenya.cms.repository.RepositoryException
- Returns:
- The document node, if this is a meta data node, or the node itself otherwise.
- Throws:
org.apache.avalon.framework.service.ServiceException
RepositoryException
createTransactionable
public void createTransactionable()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
createTransactionable
in interface org.apache.lenya.transaction.Transactionable
- Throws:
org.apache.lenya.cms.repository.RepositoryException
- See Also:
Transactionable.createTransactionable()
lock
public void lock()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
lock
in interface org.apache.lenya.cms.repository.Node
- Specified by:
lock
in interface org.apache.lenya.transaction.Lockable
- Throws:
org.apache.lenya.cms.repository.RepositoryException
- See Also:
Lockable.lock()
getLock
public org.apache.lenya.transaction.Lock getLock()
- Specified by:
getLock
in interface org.apache.lenya.transaction.Lockable
- See Also:
Lockable.getLock()
unlock
public void unlock()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
unlock
in interface org.apache.lenya.cms.repository.Node
- Specified by:
unlock
in interface org.apache.lenya.transaction.Lockable
- Throws:
org.apache.lenya.cms.repository.RepositoryException
- See Also:
Lockable.unlock()
isLocked
public boolean isLocked()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
isLocked
in interface org.apache.lenya.cms.repository.Node
- Specified by:
isLocked
in interface org.apache.lenya.transaction.Lockable
- Throws:
org.apache.lenya.cms.repository.RepositoryException
- See Also:
Lockable.isLocked()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()
getChildren
public java.util.Collection getChildren()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
getChildren
in interface org.apache.lenya.cms.repository.Node
- Throws:
org.apache.lenya.cms.repository.RepositoryException
isCollection
public boolean isCollection()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
isCollection
in interface org.apache.lenya.cms.repository.Node
- Throws:
org.apache.lenya.cms.repository.RepositoryException
getSourceURI
public java.lang.String getSourceURI()
- Specified by:
getSourceURI
in interface org.apache.lenya.cms.repository.ContentHolder
- See Also:
ContentHolder.getSourceURI()
getSession
public org.apache.lenya.cms.repository.Session getSession()
- Specified by:
getSession
in interface org.apache.lenya.cms.repository.Node
- Specified by:
getSession
in interface org.apache.lenya.cms.repository.RepositoryItem
- See Also:
Node.getSession()
registerDirty
public void registerDirty()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
registerDirty
in interface org.apache.lenya.cms.repository.Node
- Throws:
org.apache.lenya.cms.repository.RepositoryException
enqueueEvent
protected void enqueueEvent(java.lang.Object descriptor)
registerRemoved
public void registerRemoved()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
registerRemoved
in interface org.apache.lenya.cms.repository.Node
- Throws:
org.apache.lenya.cms.repository.RepositoryException
getRcml
protected org.apache.lenya.cms.rc.RCML getRcml()
getHistory
public org.apache.lenya.cms.repository.History getHistory()
- Specified by:
getHistory
in interface org.apache.lenya.cms.repository.Node
getMetaData
public org.apache.lenya.cms.metadata.MetaData getMetaData(java.lang.String namespaceUri)
throws org.apache.lenya.cms.metadata.MetaDataException
- Specified by:
getMetaData
in interface org.apache.lenya.cms.metadata.MetaDataOwner
- Throws:
org.apache.lenya.cms.metadata.MetaDataException
exists
public boolean exists()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
exists
in interface org.apache.lenya.cms.repository.ContentHolder
- Specified by:
exists
in interface org.apache.lenya.cms.repository.Node
- Throws:
org.apache.lenya.cms.repository.RepositoryException
getOutputStream
public java.io.OutputStream getOutputStream()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
getOutputStream
in interface org.apache.lenya.cms.repository.Node
- Throws:
org.apache.lenya.cms.repository.RepositoryException
getContentLength
public long getContentLength()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
getContentLength
in interface org.apache.lenya.cms.repository.ContentHolder
- Throws:
org.apache.lenya.cms.repository.RepositoryException
getInputStream
public java.io.InputStream getInputStream()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
getInputStream
in interface org.apache.lenya.cms.repository.ContentHolder
- Throws:
org.apache.lenya.cms.repository.RepositoryException
getLastModified
public long getLastModified()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
getLastModified
in interface org.apache.lenya.cms.repository.ContentHolder
- Throws:
org.apache.lenya.cms.repository.RepositoryException
getMimeType
public java.lang.String getMimeType()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
getMimeType
in interface org.apache.lenya.cms.repository.ContentHolder
- Throws:
org.apache.lenya.cms.repository.RepositoryException
getMetaDataNamespaceUris
public java.lang.String[] getMetaDataNamespaceUris()
throws org.apache.lenya.cms.metadata.MetaDataException
- Specified by:
getMetaDataNamespaceUris
in interface org.apache.lenya.cms.metadata.MetaDataOwner
- Throws:
org.apache.lenya.cms.metadata.MetaDataException
saveTransactionable
public void saveTransactionable()
throws org.apache.lenya.transaction.TransactionException
- Specified by:
saveTransactionable
in interface org.apache.lenya.transaction.Transactionable
- Throws:
org.apache.lenya.transaction.TransactionException
delete
public void delete()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
delete
in interface org.apache.lenya.cms.repository.Node
- Throws:
org.apache.lenya.cms.repository.RepositoryException
getCheckoutUserId
public java.lang.String getCheckoutUserId()
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
getCheckoutUserId
in interface org.apache.lenya.cms.repository.Node
- Throws:
org.apache.lenya.cms.repository.RepositoryException
copyRevisionsFrom
public void copyRevisionsFrom(org.apache.lenya.cms.repository.Node source)
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
copyRevisionsFrom
in interface org.apache.lenya.cms.repository.Node
- Throws:
org.apache.lenya.cms.repository.RepositoryException
rollback
public void rollback(int revisionNumber)
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
rollback
in interface org.apache.lenya.cms.repository.Node
- Throws:
org.apache.lenya.cms.repository.RepositoryException
isCheckedOutBySession
public boolean isCheckedOutBySession()
throws org.apache.lenya.transaction.TransactionException
- Specified by:
isCheckedOutBySession
in interface org.apache.lenya.transaction.Versionable
- Throws:
org.apache.lenya.transaction.TransactionException
setPersistable
public void setPersistable(org.apache.lenya.cms.repository.Persistable item)
throws org.apache.lenya.cms.repository.RepositoryException
- Specified by:
setPersistable
in interface org.apache.lenya.cms.repository.Node
- Throws:
org.apache.lenya.cms.repository.RepositoryException
getPersistable
public org.apache.lenya.cms.repository.Persistable getPersistable()
- Specified by:
getPersistable
in interface org.apache.lenya.cms.repository.Node
Copyright © $ Apache Software Foundation. All Rights Reserved.