org.outerj.daisy.repository.serverimpl
Class LocalDocumentStrategy
java.lang.Object
org.outerj.daisy.repository.serverimpl.AbstractLocalStrategy
org.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
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)
|
java.lang.String |
getClientVersion(org.outerj.daisy.repository.commonimpl.AuthenticatedUser user)
|
org.outerj.daisy.repository.commonimpl.LockInfoImpl |
getLockInfo(org.outerj.daisy.repository.commonimpl.DocumentVariantImpl variant)
|
java.lang.String |
getServerVersion(org.outerj.daisy.repository.commonimpl.AuthenticatedUser user)
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LocalDocumentStrategy
public LocalDocumentStrategy(LocalRepositoryManager.Context context,
org.outerj.daisy.repository.commonimpl.AuthenticatedUser systemUser,
org.outerj.daisy.jdbcutil.JdbcHelper jdbcHelper)
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
getClientVersion
public java.lang.String getClientVersion(org.outerj.daisy.repository.commonimpl.AuthenticatedUser user)
- Specified by:
getClientVersion
in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
getServerVersion
public java.lang.String getServerVersion(org.outerj.daisy.repository.commonimpl.AuthenticatedUser user)
- Specified by:
getServerVersion
in interface org.outerj.daisy.repository.commonimpl.DocumentStrategy
Copyright © -2012 . All Rights Reserved.