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,
int increment)
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
|
String |
findCurrentVersionName(String docUuid)
Find current document version name
Used for document checksum verification
|
NodeDocumentVersion |
findVersion(String docUuid,
String name)
Find current document version
|
InputStream |
getCurrentContentByParent(String docUuid,
boolean extendedSecurity)
Get document version content
|
static NodeDocumentVersionDAO |
getInstance() |
InputStream |
getVersionContentByParent(String docUuid,
String name)
Get document version content
|
String |
getVersionContentChecksumByParent(String docUuid,
String name)
Get document version content checksum.
|
NodeDocumentVersion |
liveEditCheckin(String user,
String comment,
int increment,
String docUuid)
Create new version from temporal file.
|
void |
liveEditSetContent(String docUuid,
InputStream is,
long size)
Set temporal 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 findVersion(String docUuid, String name) throws PathNotFoundException, DatabaseException
public NodeDocumentVersion findCurrentVersion(String docUuid) throws PathNotFoundException, DatabaseException
public String findCurrentVersionName(String docUuid) throws PathNotFoundException, DatabaseException
public String getVersionContentChecksumByParent(String docUuid, String name) throws PathNotFoundException, DatabaseException, FileNotFoundException, IOException
public NodeDocumentVersion findCurrentVersion(org.hibernate.Session session, String docUuid) throws org.hibernate.HibernateException
org.hibernate.HibernateException
public InputStream getCurrentContentByParent(String docUuid, boolean extendedSecurity) throws PathNotFoundException, AccessDeniedException, DatabaseException, FileNotFoundException, IOException
docUuid
- Id of the document to get the content.extendedSecurity
- If the extended security DOWNLOAD permission should be evaluated.
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, int increment) 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
public void liveEditSetContent(String docUuid, InputStream is, long size) throws IOException, PathNotFoundException, AccessDeniedException, LockException, DatabaseException
public NodeDocumentVersion liveEditCheckin(String user, String comment, int increment, String docUuid) throws IOException, PathNotFoundException, AccessDeniedException, LockException, DatabaseException
Copyright © 2017 Open Knowledge Management System S.L.. All rights reserved.