org.outerj.daisy.repository.serverimpl
Class LocalDocumentStrategy

java.lang.Object
  extended byorg.outerj.daisy.repository.serverimpl.AbstractLocalStrategy
      extended byorg.outerj.daisy.repository.serverimpl.LocalDocumentStrategy
All Implemented Interfaces:
org.outerj.daisy.repository.commonimpl.DocumentStrategy

public class LocalDocumentStrategy
extends AbstractLocalStrategy
implements org.outerj.daisy.repository.commonimpl.DocumentStrategy


Field Summary
 
Fields inherited from class org.outerj.daisy.repository.serverimpl.AbstractLocalStrategy
context, eventHelper, jdbcHelper, logger, systemUser
 
Constructor Summary
LocalDocumentStrategy(LocalRepositoryManager.Context context, org.outerj.daisy.repository.commonimpl.AuthenticatedUser systemUser, org.outerj.daisy.jdbcutil.JdbcHelper jdbcHelper)
           
 
Method Summary
 void completeVersion(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl variant, org.outerj.daisy.repository.commonimpl.VersionImpl version)
           
 org.outerj.daisy.repository.Document createVariant(long documentId, long startBranchId, long startLanguageId, long startVersionId, long newBranchId, long newLanguageId, org.outerj.daisy.repository.commonimpl.AuthenticatedUser user)
           
 void deleteDocument(long documentId, org.outerj.daisy.repository.commonimpl.AuthenticatedUser user)
           
 void deleteVariant(long documentId, long branchId, long languageId, org.outerj.daisy.repository.commonimpl.AuthenticatedUser user)
           
 org.outerj.daisy.repository.commonimpl.AvailableVariantImpl[] getAvailableVariants(long documentId, org.outerj.daisy.repository.commonimpl.AuthenticatedUser user)
           
 org.outerj.daisy.repository.commonimpl.AvailableVariantImpl[] getAvailableVariantsInTransaction(long documentId, org.outerj.daisy.repository.commonimpl.AuthenticatedUser user, java.sql.Connection conn, boolean takeLock)
           
 java.io.InputStream getBlob(long documentId, long branchId, long languageId, long versionId, long partTypeId, org.outerj.daisy.repository.commonimpl.AuthenticatedUser user)
           
 java.io.InputStream getBlob(java.lang.String blobKey)
           
 org.outerj.daisy.repository.commonimpl.LockInfoImpl getLockInfo(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl variant)
           
 org.outerj.daisy.repository.Document load(org.outerj.daisy.repository.commonimpl.AuthenticatedUser user, long documentId, long branchId, long languageId)
           
 org.outerj.daisy.repository.commonimpl.VersionImpl[] loadShallowVersions(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl variant)
           
 org.outerj.daisy.repository.commonimpl.VersionImpl loadVersion(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl variant, long versionId)
           
 org.outerj.daisy.repository.commonimpl.LockInfoImpl lock(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl variant, long duration, org.outerj.daisy.repository.LockType lockType)
           
 org.outerj.daisy.repository.commonimpl.LockInfoImpl releaseLock(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl variant)
           
 void setVersionState(org.outerj.daisy.repository.commonimpl.DocumentImpl document, org.outerj.daisy.repository.commonimpl.VersionImpl version, org.outerj.daisy.repository.VersionState versionState)
           
 void store(org.outerj.daisy.repository.commonimpl.DocumentImpl document)
           
 
Methods inherited from class org.outerj.daisy.repository.serverimpl.AbstractLocalStrategy
getBranchLabel, getCalendar, getLanguageLabel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalDocumentStrategy

public LocalDocumentStrategy(LocalRepositoryManager.Context context,
                             org.outerj.daisy.repository.commonimpl.AuthenticatedUser systemUser,
                             org.outerj.daisy.jdbcutil.JdbcHelper jdbcHelper)
Method Detail

load

public org.outerj.daisy.repository.Document load(org.outerj.daisy.repository.commonimpl.AuthenticatedUser user,
                                                 long documentId,
                                                 long branchId,
                                                 long languageId)
                                          throws org.outerj.daisy.repository.RepositoryException
Specified by:
load in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException

store

public void store(org.outerj.daisy.repository.commonimpl.DocumentImpl document)
           throws org.outerj.daisy.repository.RepositoryException
Specified by:
store in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException

getBlob

public java.io.InputStream getBlob(long documentId,
                                   long branchId,
                                   long languageId,
                                   long versionId,
                                   long partTypeId,
                                   org.outerj.daisy.repository.commonimpl.AuthenticatedUser user)
                            throws org.outerj.daisy.repository.RepositoryException
Specified by:
getBlob in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException

getBlob

public java.io.InputStream getBlob(java.lang.String blobKey)
                            throws org.outerj.daisy.repository.RepositoryException
Specified by:
getBlob in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException

loadShallowVersions

public org.outerj.daisy.repository.commonimpl.VersionImpl[] loadShallowVersions(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl variant)
                                                                         throws org.outerj.daisy.repository.RepositoryException
Specified by:
loadShallowVersions in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException

loadVersion

public org.outerj.daisy.repository.commonimpl.VersionImpl loadVersion(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl variant,
                                                                      long versionId)
                                                               throws org.outerj.daisy.repository.RepositoryException
Specified by:
loadVersion in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException

completeVersion

public void completeVersion(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl variant,
                            org.outerj.daisy.repository.commonimpl.VersionImpl version)
                     throws org.outerj.daisy.repository.RepositoryException
Specified by:
completeVersion in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException

setVersionState

public void setVersionState(org.outerj.daisy.repository.commonimpl.DocumentImpl document,
                            org.outerj.daisy.repository.commonimpl.VersionImpl version,
                            org.outerj.daisy.repository.VersionState versionState)
                     throws org.outerj.daisy.repository.RepositoryException
Specified by:
setVersionState in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException

lock

public org.outerj.daisy.repository.commonimpl.LockInfoImpl lock(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl variant,
                                                                long duration,
                                                                org.outerj.daisy.repository.LockType lockType)
                                                         throws org.outerj.daisy.repository.RepositoryException
Specified by:
lock in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException

getLockInfo

public org.outerj.daisy.repository.commonimpl.LockInfoImpl getLockInfo(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl variant)
                                                                throws org.outerj.daisy.repository.RepositoryException
Specified by:
getLockInfo in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException

releaseLock

public org.outerj.daisy.repository.commonimpl.LockInfoImpl releaseLock(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl variant)
                                                                throws org.outerj.daisy.repository.RepositoryException
Specified by:
releaseLock in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException

deleteDocument

public void deleteDocument(long documentId,
                           org.outerj.daisy.repository.commonimpl.AuthenticatedUser user)
                    throws org.outerj.daisy.repository.RepositoryException
Specified by:
deleteDocument in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException

deleteVariant

public void deleteVariant(long documentId,
                          long branchId,
                          long languageId,
                          org.outerj.daisy.repository.commonimpl.AuthenticatedUser user)
                   throws org.outerj.daisy.repository.RepositoryException
Specified by:
deleteVariant in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException

getAvailableVariants

public org.outerj.daisy.repository.commonimpl.AvailableVariantImpl[] getAvailableVariants(long documentId,
                                                                                          org.outerj.daisy.repository.commonimpl.AuthenticatedUser user)
                                                                                   throws org.outerj.daisy.repository.RepositoryException
Specified by:
getAvailableVariants in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException

getAvailableVariantsInTransaction

public org.outerj.daisy.repository.commonimpl.AvailableVariantImpl[] getAvailableVariantsInTransaction(long documentId,
                                                                                                       org.outerj.daisy.repository.commonimpl.AuthenticatedUser user,
                                                                                                       java.sql.Connection conn,
                                                                                                       boolean takeLock)
                                                                                                throws org.outerj.daisy.repository.RepositoryException,
                                                                                                       java.sql.SQLException
Throws:
org.outerj.daisy.repository.RepositoryException
java.sql.SQLException

createVariant

public org.outerj.daisy.repository.Document createVariant(long documentId,
                                                          long startBranchId,
                                                          long startLanguageId,
                                                          long startVersionId,
                                                          long newBranchId,
                                                          long newLanguageId,
                                                          org.outerj.daisy.repository.commonimpl.AuthenticatedUser user)
                                                   throws org.outerj.daisy.repository.RepositoryException
Specified by:
createVariant in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Throws:
org.outerj.daisy.repository.RepositoryException


Copyright © -2005 . All Rights Reserved.