org.apache.jackrabbit.core.journal
Class AbstractRecord

java.lang.Object
  extended by org.apache.jackrabbit.core.journal.AbstractRecord
All Implemented Interfaces:
Record
Direct Known Subclasses:
AppendRecord, ReadRecord

public abstract class AbstractRecord
extends Object
implements Record

Base implementation for a record.


Field Summary
protected  org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver nsResolver
          Namespace resolver.
protected  org.apache.jackrabbit.spi.commons.conversion.NamePathResolver resolver
          Name and Path resolver.
 
Constructor Summary
AbstractRecord(org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver nsResolver, org.apache.jackrabbit.spi.commons.conversion.NamePathResolver resolver)
          Create a new instance of this class.
 
Method Summary
 NodeId readNodeId()
          Read a NodeId from the underlying stream.
 org.apache.jackrabbit.spi.QNodeTypeDefinition readNodeTypeDef()
          Read a NodeTypeDef from the underlying stream.
 org.apache.jackrabbit.spi.Path readPath()
          Read a Path from the underlying stream.
 org.apache.jackrabbit.spi.Path readPathElement()
          Read a named path element from the underlying stream.
 org.apache.jackrabbit.spi.PrivilegeDefinition readPrivilegeDef()
          Read a PrivilegeDefinition from the underlying stream.
 PropertyId readPropertyId()
          Read a PropertyId from the underlying stream.
 org.apache.jackrabbit.spi.Name readQName()
          Read a Name frmo the underlying stream.
 void writeNodeId(NodeId nodeId)
          Write a NodeId to the underlying stream.
 void writeNodeTypeDef(org.apache.jackrabbit.spi.QNodeTypeDefinition ntd)
          Write a NodeTypeDef to the underlying stream.
 void writePath(org.apache.jackrabbit.spi.Path path)
          Write a Path to the underlying stream.
 void writePathElement(org.apache.jackrabbit.spi.Path path)
          Write a Path.Element to the underlying stream.
 void writePrivilegeDef(org.apache.jackrabbit.spi.PrivilegeDefinition privilegeDefinition)
          Write a PrivilegeDefinition to the underlying stream.
 void writePropertyId(PropertyId propertyId)
          Write a PropertyId to the underlying stream.
 void writeQName(org.apache.jackrabbit.spi.Name name)
          Write a Name to the underlying stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.jackrabbit.core.journal.Record
cancelUpdate, getJournalId, getProducerId, getRevision, readBoolean, readByte, readChar, readFully, readInt, readLong, readString, update, write, writeBoolean, writeByte, writeChar, writeInt, writeLong, writeString
 

Field Detail

nsResolver

protected final org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver nsResolver
Namespace resolver.


resolver

protected final org.apache.jackrabbit.spi.commons.conversion.NamePathResolver resolver
Name and Path resolver.

Constructor Detail

AbstractRecord

public AbstractRecord(org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver nsResolver,
                      org.apache.jackrabbit.spi.commons.conversion.NamePathResolver resolver)
Create a new instance of this class.

Parameters:
nsResolver - the namespace resolver
resolver - the name-path resolver
Method Detail

writeQName

public void writeQName(org.apache.jackrabbit.spi.Name name)
                throws JournalException
Write a Name to the underlying stream.

Specified by:
writeQName in interface Record
Parameters:
name - name
Throws:
JournalException - if an error occurs

writePathElement

public void writePathElement(org.apache.jackrabbit.spi.Path path)
                      throws JournalException
Write a Path.Element to the underlying stream.

Specified by:
writePathElement in interface Record
Parameters:
path - path element
Throws:
JournalException - if an error occurs

writePath

public void writePath(org.apache.jackrabbit.spi.Path path)
               throws JournalException
Write a Path to the underlying stream.

Specified by:
writePath in interface Record
Parameters:
path - path
Throws:
JournalException - if an error occurs

writeNodeId

public void writeNodeId(NodeId nodeId)
                 throws JournalException
Write a NodeId to the underlying stream.

Specified by:
writeNodeId in interface Record
Parameters:
nodeId - node id
Throws:
JournalException - if an error occurs

writePropertyId

public void writePropertyId(PropertyId propertyId)
                     throws JournalException
Write a PropertyId to the underlying stream.

Specified by:
writePropertyId in interface Record
Parameters:
propertyId - property id
Throws:
JournalException - if an error occurs

writeNodeTypeDef

public void writeNodeTypeDef(org.apache.jackrabbit.spi.QNodeTypeDefinition ntd)
                      throws JournalException
Write a NodeTypeDef to the underlying stream.

Specified by:
writeNodeTypeDef in interface Record
Parameters:
ntd - node type definition
Throws:
JournalException - if an error occurs

writePrivilegeDef

public void writePrivilegeDef(org.apache.jackrabbit.spi.PrivilegeDefinition privilegeDefinition)
                       throws JournalException
Write a PrivilegeDefinition to the underlying stream.

Specified by:
writePrivilegeDef in interface Record
Parameters:
privilegeDefinition - privilege definition
Throws:
JournalException - if an error occurs

readQName

public org.apache.jackrabbit.spi.Name readQName()
                                         throws JournalException
Read a Name frmo the underlying stream.

Specified by:
readQName in interface Record
Returns:
name name
Throws:
JournalException - if an error occurs

readPathElement

public org.apache.jackrabbit.spi.Path readPathElement()
                                               throws JournalException
Read a named path element from the underlying stream.

Specified by:
readPathElement in interface Record
Returns:
path element
Throws:
JournalException - if an error occurs

readPath

public org.apache.jackrabbit.spi.Path readPath()
                                        throws JournalException
Read a Path from the underlying stream.

Specified by:
readPath in interface Record
Returns:
path
Throws:
JournalException - if an error occurs

readNodeId

public NodeId readNodeId()
                  throws JournalException
Read a NodeId from the underlying stream.

Specified by:
readNodeId in interface Record
Returns:
node id
Throws:
JournalException - if an error occurs

readPropertyId

public PropertyId readPropertyId()
                          throws JournalException
Read a PropertyId from the underlying stream.

Specified by:
readPropertyId in interface Record
Returns:
property id
Throws:
JournalException - if an error occurs

readNodeTypeDef

public org.apache.jackrabbit.spi.QNodeTypeDefinition readNodeTypeDef()
                                                              throws JournalException
Read a NodeTypeDef from the underlying stream.

Specified by:
readNodeTypeDef in interface Record
Returns:
node type definition
Throws:
JournalException - if an error occurs

readPrivilegeDef

public org.apache.jackrabbit.spi.PrivilegeDefinition readPrivilegeDef()
                                                               throws JournalException
Read a PrivilegeDefinition from the underlying stream.

Specified by:
readPrivilegeDef in interface Record
Returns:
privilege definition
Throws:
JournalException - if an error occurs


Copyright © 2004-2012 The Apache Software Foundation. All Rights Reserved.