org.outerj.daisy.publisher.serverimpl.requestmodel
Class PublisherContextImpl

java.lang.Object
  extended by org.outerj.daisy.publisher.serverimpl.requestmodel.PublisherContextImpl
All Implemented Interfaces:
PublisherContext

public class PublisherContextImpl
extends java.lang.Object
implements PublisherContext


Field Summary
 
Fields inherited from interface org.outerj.daisy.publisher.serverimpl.requestmodel.PublisherContext
NO_VERSION
 
Constructor Summary
PublisherContextImpl(PublisherContext parentPublisherContext)
           
 
Method Summary
 long getBranchId()
           
 ContentProcessor getContentProcessor()
          Returns null if not available.
 org.outerj.daisy.repository.Document getDocument()
           
 long getDocumentId()
           
 long getLanguageId()
           
 java.util.Locale getLocale()
           
 org.apache.avalon.framework.logger.Logger getLogger()
           
 PreparedDocuments getPreparedDocuments()
          Returns null if not available.
 PublisherImpl getPublisher()
           
 org.outerj.daisy.repository.Repository getRepository()
           
 java.text.DateFormat getTimestampFormat()
           
 org.outerj.daisy.repository.VariantKey getVariantKey()
           
 org.outerj.daisy.repository.Version getVersion()
          If a live version was requested but the document doesn't have a live version, this method returns null.
 long getVersionId()
          If a live version was requested but the document doesn't have a live version, this method returns NO_VERSION.
 PublisherVersionMode getVersionMode()
           
 boolean hasDocument()
          Returns true if the getDocument and getVersion methods can safely be called.
 boolean searchRecursivePrepDocs(long documentId, long branchId, long languageId, java.lang.String pubReqSetName)
           
 void setContentProcessor(ContentProcessor contentProcessor)
           
 void setDocumentVariant(long documentId, long branchId, long languageId)
           
 void setLocale(java.util.Locale locale)
           
 void setPreparedDocuments(PreparedDocuments preparedDocuments)
           
 void setVersionId(long versionId)
           
 void setVersionMode(PublisherVersionMode versionMode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PublisherContextImpl

public PublisherContextImpl(PublisherContext parentPublisherContext)
Method Detail

setLocale

public void setLocale(java.util.Locale locale)

getLocale

public java.util.Locale getLocale()
Specified by:
getLocale in interface PublisherContext

getRepository

public org.outerj.daisy.repository.Repository getRepository()
Specified by:
getRepository in interface PublisherContext

getLogger

public org.apache.avalon.framework.logger.Logger getLogger()
Specified by:
getLogger in interface PublisherContext

setDocumentVariant

public void setDocumentVariant(long documentId,
                               long branchId,
                               long languageId)

setVersionId

public void setVersionId(long versionId)

setPreparedDocuments

public void setPreparedDocuments(PreparedDocuments preparedDocuments)

setContentProcessor

public void setContentProcessor(ContentProcessor contentProcessor)

getDocumentId

public long getDocumentId()
Specified by:
getDocumentId in interface PublisherContext

getBranchId

public long getBranchId()
Specified by:
getBranchId in interface PublisherContext

getLanguageId

public long getLanguageId()
Specified by:
getLanguageId in interface PublisherContext

getVersionId

public long getVersionId()
                  throws org.outerj.daisy.repository.RepositoryException
Description copied from interface: PublisherContext
If a live version was requested but the document doesn't have a live version, this method returns NO_VERSION. Otherwise, the actual version number is returned.

Specified by:
getVersionId in interface PublisherContext
Throws:
org.outerj.daisy.repository.RepositoryException

getVariantKey

public org.outerj.daisy.repository.VariantKey getVariantKey()
Specified by:
getVariantKey in interface PublisherContext

getTimestampFormat

public java.text.DateFormat getTimestampFormat()
Specified by:
getTimestampFormat in interface PublisherContext

getDocument

public org.outerj.daisy.repository.Document getDocument()
                                                 throws org.outerj.daisy.repository.RepositoryException
Specified by:
getDocument in interface PublisherContext
Throws:
org.outerj.daisy.repository.RepositoryException

getVersion

public org.outerj.daisy.repository.Version getVersion()
                                               throws org.outerj.daisy.repository.RepositoryException
Description copied from interface: PublisherContext
If a live version was requested but the document doesn't have a live version, this method returns null.

Specified by:
getVersion in interface PublisherContext
Throws:
org.outerj.daisy.repository.RepositoryException

hasDocument

public boolean hasDocument()
Description copied from interface: PublisherContext
Returns true if the getDocument and getVersion methods can safely be called. (though getVersion might return null)

Specified by:
hasDocument in interface PublisherContext

getPublisher

public PublisherImpl getPublisher()
Specified by:
getPublisher in interface PublisherContext

getPreparedDocuments

public PreparedDocuments getPreparedDocuments()
Description copied from interface: PublisherContext
Returns null if not available.

Specified by:
getPreparedDocuments in interface PublisherContext

getContentProcessor

public ContentProcessor getContentProcessor()
Description copied from interface: PublisherContext
Returns null if not available.

Specified by:
getContentProcessor in interface PublisherContext

searchRecursivePrepDocs

public boolean searchRecursivePrepDocs(long documentId,
                                       long branchId,
                                       long languageId,
                                       java.lang.String pubReqSetName)
Specified by:
searchRecursivePrepDocs in interface PublisherContext

setVersionMode

public void setVersionMode(PublisherVersionMode versionMode)

getVersionMode

public PublisherVersionMode getVersionMode()
Specified by:
getVersionMode in interface PublisherContext


Copyright © -2012 . All Rights Reserved.