public class NodeDocumentVersionDAO extends GenericDAO<NodeDocumentVersion,String>
Modifier and Type | Method and Description |
---|---|
NodeDocumentVersion |
checkin(String user,
String comment,
String docUuid,
InputStream is,
long size)
Create or update dummy version
|
List<NodeDocumentVersion> |
findByParent(String docUuid)
Find by parent
|
NodeDocumentVersion |
findCurrentVersion(org.hibernate.Session session,
String docUuid)
Find current document version
|
NodeDocumentVersion |
findCurrentVersion(String docUuid)
Find current document version
|
InputStream |
getCurrentContentByParent(String docUuid)
Get document version content
|
static NodeDocumentVersionDAO |
getInstance() |
InputStream |
getVersionContentByParent(String docUuid,
String name)
Get document version content
|
void |
purgeHelper(org.hibernate.Session session,
String parentUuid)
Purge in depth helper
|
void |
purgeVersionHistory(String docUuid)
Purge all non-current document version history nodes
|
void |
restoreVersion(String docUuid,
String versionId)
Set a document version as current.
|
void |
setContent(String docUuid,
InputStream is,
long size)
Set version content.
|
create, delete, findAll, findByPk, getPersistentClass, getSession, setSession, update
public static NodeDocumentVersionDAO getInstance()
public List<NodeDocumentVersion> findByParent(String docUuid) throws PathNotFoundException, DatabaseException
public NodeDocumentVersion findCurrentVersion(String docUuid) throws PathNotFoundException, DatabaseException
public NodeDocumentVersion findCurrentVersion(org.hibernate.Session session, String docUuid) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public InputStream getCurrentContentByParent(String docUuid) throws PathNotFoundException, AccessDeniedException, DatabaseException, FileNotFoundException, IOException
docUuid
- Id of the document to get the content.
This is used to enable the document preview.PathNotFoundException
AccessDeniedException
DatabaseException
FileNotFoundException
IOException
public InputStream getVersionContentByParent(String docUuid, String name) throws PathNotFoundException, DatabaseException, FileNotFoundException, IOException
public NodeDocumentVersion checkin(String user, String comment, String docUuid, InputStream is, long size) throws IOException, PathNotFoundException, AccessDeniedException, LockException, DatabaseException
public void setContent(String docUuid, InputStream is, long size) throws IOException, PathNotFoundException, AccessDeniedException, LockException, DatabaseException
public void restoreVersion(String docUuid, String versionId) throws PathNotFoundException, AccessDeniedException, LockException, DatabaseException
public void purgeVersionHistory(String docUuid) throws PathNotFoundException, AccessDeniedException, LockException, IOException, DatabaseException
public void purgeHelper(org.hibernate.Session session, String parentUuid) throws org.hibernate.HibernateException, IOException
org.hibernate.HibernateException
IOException
Copyright © 2015. All Rights Reserved.