public class NodeDocumentDAO extends Object
Modifier and Type | Method and Description |
---|---|
void |
cancelCheckout(String user,
String uuid,
boolean force)
Cancel checkout
|
void |
checkout(String user,
String uuid)
Checkout
|
NodeDocumentVersion |
create(NodeDocument nDoc,
InputStream is,
long size)
Create document and first version
|
void |
delete(String name,
String uuid,
String trashUuid)
Delete document
|
List<NodeDocument> |
findAll()
Find all documents
|
List<NodeDocument> |
findByCategory(String catUuid)
Search nodes by category
|
List<NodeDocument> |
findByKeyword(String keyword)
Search nodes by keyword
|
List<NodeDocument> |
findByParent(String parentUuid)
Find by parent
|
NodeDocument |
findByPk(String uuid)
Find by pk
|
NodeDocument |
findByPk(String uuid,
boolean initPropGroups)
Find by pk and optionally initialize node property groups
|
List<NodeDocument> |
findByPropertyValue(String group,
String property,
String value)
Search nodes by property value
|
List<NodeDocument> |
findFromParent(String parentUuid)
Search nodes from a given parent recursively
|
String |
getExtractedText(org.hibernate.Session session,
String uuid)
Get extracted text.
|
String |
getExtractedText(String uuid)
Get extracted text.
|
static NodeDocumentDAO |
getInstance() |
NodeLock |
getLock(String uuid)
Test for locked status
|
List<TextExtractorWork> |
getPendingExtractions(int maxResults)
Get pending extraction queue
|
long |
getPendingExtractionSize()
Get pending extraction size
|
long |
getSize(String context)
Get document node size.
|
long |
getSubtreeSize(String path)
Get document node size.
|
boolean |
hasChildren(String parentUuid)
Check if folder has children
|
boolean |
hasPendingExtractions()
Check for extraction queue
|
void |
initialize(NodeDocument nDocument,
boolean initPropGroups)
Force initialization of a proxy
|
boolean |
isCheckedOut(String uuid)
Test for checked out status
|
boolean |
isLocked(String uuid)
Test for locked status
|
boolean |
isTextExtracted(String uuid)
Check if text has been already extracted.
|
boolean |
isValid(String uuid)
Check for a valid document node.
|
void |
liveEditCancelCheckout(String user,
String uuid,
boolean force)
Cancel checkout and delete temporal file.
|
void |
lock(String user,
NodeDocument nDoc)
Lock node
|
NodeLock |
lock(String user,
String uuid)
Lock node
|
void |
move(String uuid,
String dstUuid)
Move document
|
void |
purge(String uuid)
Purge in depth
|
void |
purgeHelper(org.hibernate.Session session,
String parentUuid)
Purge in depth helper
|
NodeDocument |
rename(String uuid,
String newName)
Rename document
|
int |
resetAllPendingExtractionFlags()
Clear pending extraction queue
|
int |
resetPendingExtractionFlag(String docUuid)
Clear pending extraction queue
Note: the HQL query fails due to https://hibernate.atlassian.net/browse/HHH-1657
|
String |
textExtractorHelper(TextExtractorWork work)
Helps on extracting text from documents
|
void |
unlock(String user,
NodeDocument nDoc,
boolean force)
Unlock node
|
void |
unlock(String user,
String uuid,
boolean force)
Unlock node
|
public static NodeDocumentDAO getInstance()
public NodeDocumentVersion create(NodeDocument nDoc, InputStream is, long size) throws PathNotFoundException, AccessDeniedException, ItemExistsException, DatabaseException, IOException
public List<NodeDocument> findAll() throws DatabaseException
DatabaseException
public List<NodeDocument> findByParent(String parentUuid) throws PathNotFoundException, DatabaseException
public NodeDocument findByPk(String uuid) throws PathNotFoundException, DatabaseException
public NodeDocument findByPk(String uuid, boolean initPropGroups) throws PathNotFoundException, DatabaseException
public List<NodeDocument> findByCategory(String catUuid) throws PathNotFoundException, DatabaseException
public List<NodeDocument> findByKeyword(String keyword) throws DatabaseException
DatabaseException
public List<NodeDocument> findByPropertyValue(String group, String property, String value) throws DatabaseException
DatabaseException
public List<NodeDocument> findFromParent(String parentUuid) throws DatabaseException
DatabaseException
public boolean hasChildren(String parentUuid) throws PathNotFoundException, DatabaseException
public NodeDocument rename(String uuid, String newName) throws PathNotFoundException, AccessDeniedException, ItemExistsException, LockException, DatabaseException
public void move(String uuid, String dstUuid) throws PathNotFoundException, AccessDeniedException, ItemExistsException, LockException, DatabaseException
public void delete(String name, String uuid, String trashUuid) throws PathNotFoundException, AccessDeniedException, LockException, DatabaseException
public void checkout(String user, String uuid) throws PathNotFoundException, AccessDeniedException, LockException, DatabaseException
public void cancelCheckout(String user, String uuid, boolean force) throws PathNotFoundException, AccessDeniedException, LockException, DatabaseException
public boolean isCheckedOut(String uuid) throws PathNotFoundException, DatabaseException
public void purge(String uuid) throws PathNotFoundException, AccessDeniedException, LockException, DatabaseException, IOException
public void purgeHelper(org.hibernate.Session session, String parentUuid) throws PathNotFoundException, AccessDeniedException, LockException, IOException, DatabaseException, org.hibernate.HibernateException
PathNotFoundException
AccessDeniedException
LockException
IOException
DatabaseException
org.hibernate.HibernateException
com.openkm.dao.NodeFolderDAO.purgeHelper(Session, NodeFolder, boolean)
,
com.openkm.dao.NodeMailDAO.purgeHelper(Session, NodeMail)
public NodeLock lock(String user, String uuid) throws PathNotFoundException, AccessDeniedException, LockException, DatabaseException
public void lock(String user, NodeDocument nDoc) throws org.hibernate.HibernateException, LockException
org.hibernate.HibernateException
LockException
public void unlock(String user, String uuid, boolean force) throws PathNotFoundException, AccessDeniedException, DatabaseException, LockException
public void unlock(String user, NodeDocument nDoc, boolean force) throws org.hibernate.HibernateException, LockException
org.hibernate.HibernateException
LockException
public boolean isLocked(String uuid) throws PathNotFoundException, DatabaseException
public NodeLock getLock(String uuid) throws PathNotFoundException, LockException, DatabaseException
public long getSize(String context) throws PathNotFoundException, DatabaseException
PathNotFoundException
DatabaseException
com.openkm.module.nr.NrStatsModule
public long getSubtreeSize(String path) throws PathNotFoundException, DatabaseException
PathNotFoundException
DatabaseException
com.openkm.module.nr.NrStatsModule
public int resetAllPendingExtractionFlags() throws DatabaseException
DatabaseException
public int resetPendingExtractionFlag(String docUuid) throws DatabaseException
DatabaseException
public boolean hasPendingExtractions() throws DatabaseException
DatabaseException
public List<TextExtractorWork> getPendingExtractions(int maxResults) throws DatabaseException
DatabaseException
public long getPendingExtractionSize() throws DatabaseException
DatabaseException
public String textExtractorHelper(TextExtractorWork work) throws DatabaseException, FileNotFoundException
public String getExtractedText(String uuid) throws PathNotFoundException, DatabaseException
public String getExtractedText(org.hibernate.Session session, String uuid) throws PathNotFoundException, DatabaseException
public boolean isTextExtracted(String uuid) throws DatabaseException
DatabaseException
public boolean isValid(String uuid) throws DatabaseException
DatabaseException
public void initialize(NodeDocument nDocument, boolean initPropGroups)
public void liveEditCancelCheckout(String user, String uuid, boolean force) throws PathNotFoundException, AccessDeniedException, LockException, DatabaseException
Copyright © 2016. All rights reserved.