Ontimize Document Management 0.035EN

com.ontimize.dms.jcr
Class JcrStreamBase

java.lang.Object
  extended by com.ontimize.dms.jcr.JcrWrapperAbstract
      extended by com.ontimize.dms.jcr.JcrStreamBase
All Implemented Interfaces:
JcrStream, JcrWrapper

public abstract class JcrStreamBase
extends JcrWrapperAbstract
implements JcrStream

Internal class implementation of node stream.

Since:
24/12/2008, 25/10/2010 Refactoring to allow custom repository implementation.

Field Summary
protected static java.lang.String MSG_UPDATE_DATE_NULL
           
protected static java.lang.String MSG_UPDATE_STREAM_NULL
           
 
Fields inherited from class com.ontimize.dms.jcr.JcrWrapperAbstract
MSG_CREATE_NM
 
Constructor Summary
JcrStreamBase(JcrNode node, java.lang.Number version)
           
 
Method Summary
 void close()
           
protected abstract  Node createInternalNode(java.util.Map info)
           
protected  NodeManager createNodeManager(Node node)
          Creates a NodeManager with the current configuration.
protected  Node doUpdate(java.util.Map info, boolean version)
           
protected abstract  void doUpdateContent(Node node, java.util.Map info, boolean version)
           
 long getDate()
           
protected  Node getInternalNode(JcrNode node, java.lang.Number version)
           
 long getLength()
           
 java.io.InputStream getStream()
           
 java.lang.Number getVersion()
           
protected  void init()
           
 boolean isNull()
           
 boolean isVersion()
           
 void setDate(long date)
           
 void setLength(long length)
           
 void setNull(boolean isNull)
           
protected  void setStream(java.io.InputStream stream)
           
 void setVersion(java.lang.Number version)
           
 java.lang.String toString()
           
abstract  void update(java.util.Map info, boolean version)
           
 
Methods inherited from class com.ontimize.dms.jcr.JcrWrapperAbstract
createNodeManager, getConverter, getInnerSession, getInternal, getSession, getWrapper, isSaveInSessionEnabled, save, save, setConverter, setInnerSession, setInternal, setSaveInSession, setSession, setWrapper
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ontimize.dms.jcr.JcrWrapper
getInnerSession, getInternal, getSession, getWrapper, save
 

Field Detail

MSG_UPDATE_STREAM_NULL

protected static final java.lang.String MSG_UPDATE_STREAM_NULL
See Also:
Constant Field Values

MSG_UPDATE_DATE_NULL

protected static final java.lang.String MSG_UPDATE_DATE_NULL
See Also:
Constant Field Values
Constructor Detail

JcrStreamBase

public JcrStreamBase(JcrNode node,
                     java.lang.Number version)
              throws RepositoryException
Throws:
RepositoryException
Method Detail

init

protected void init()
             throws RepositoryException
Throws:
RepositoryException

createNodeManager

protected NodeManager createNodeManager(Node node)
                                 throws RepositoryException
Description copied from class: JcrWrapperAbstract
Creates a NodeManager with the current configuration.

Overrides:
createNodeManager in class JcrWrapperAbstract
Parameters:
node - Wrappered node.
Returns:
NodeManager with the current configuration
Throws:
RepositoryException

getInternalNode

protected Node getInternalNode(JcrNode node,
                               java.lang.Number version)
                        throws RepositoryException
Throws:
RepositoryException

getStream

public java.io.InputStream getStream()
Specified by:
getStream in interface JcrStream

getLength

public long getLength()
Specified by:
getLength in interface JcrStream

getDate

public long getDate()
Specified by:
getDate in interface JcrStream

isNull

public boolean isNull()
Specified by:
isNull in interface JcrStream

isVersion

public boolean isVersion()
Specified by:
isVersion in interface JcrStream

getVersion

public java.lang.Number getVersion()
Specified by:
getVersion in interface JcrStream

setStream

protected void setStream(java.io.InputStream stream)

setLength

public void setLength(long length)

setDate

public void setDate(long date)

setNull

public void setNull(boolean isNull)

setVersion

public void setVersion(java.lang.Number version)

update

public abstract void update(java.util.Map info,
                            boolean version)
                     throws RepositoryException
Specified by:
update in interface JcrStream
Throws:
RepositoryException

createInternalNode

protected abstract Node createInternalNode(java.util.Map info)
                                    throws RepositoryException
Throws:
RepositoryException

doUpdateContent

protected abstract void doUpdateContent(Node node,
                                        java.util.Map info,
                                        boolean version)
                                 throws RepositoryException
Throws:
RepositoryException

doUpdate

protected Node doUpdate(java.util.Map info,
                        boolean version)
                 throws RepositoryException
Throws:
RepositoryException

close

public void close()
           throws RepositoryException
Specified by:
close in interface JcrStream
Throws:
RepositoryException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Ontimize Document Management