public class DocumentManagerImpl extends Object implements DocumentManager
DocumentManager| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
log |
| Constructor and Description |
|---|
DocumentManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
changeIndexingStatus(Document doc,
int status)
Utility method used to declare that:
a document must be taken into consideration by the indexer (status =
AbstractDocument.INDEX_TO_INDEX).
|
void |
checkin(long docId,
File file,
String filename,
boolean release,
Document docVO,
History transaction)
Checks in the given document
|
void |
checkin(long docId,
InputStream content,
String filename,
boolean release,
Document docVO,
History transaction)
Checks in the given document
|
void |
checkout(long docId,
History transaction)
Checks out the given document
|
Document |
copyToFolder(Document doc,
Folder folder,
History transaction)
Copy a document to the specified folder.
|
Document |
create(File file,
Document docVO,
History transaction)
Creates a new Document.
|
Document |
create(InputStream content,
Document docVO,
History transaction)
Creates a new Document.
|
Document |
createShortcut(Document doc,
Folder folder,
History transaction)
Create a shortcut associated to the given doc to the specified folder.
|
void |
deleteFromIndex(Document doc)
Utility method for document removal from index
|
Version |
deleteVersion(long versionId,
History transaction)
Deletes a specific version.
|
void |
lock(long docId,
int status,
History transaction)
Locks the given document
|
void |
makeImmutable(long docId,
History transaction)
Marks the document, with the given docId, as immutable and save the given
document history
|
void |
moveToFolder(Document doc,
Folder folder,
History transaction)
Moves a document to the specified folder.
|
void |
reindex(long docId)
Reindexes an existing document in the full-text index.
|
void |
rename(Document doc,
String newName,
boolean title,
History transaction)
Rename an existing document title/filename.
|
void |
setConfig(ContextProperties config) |
void |
setDocumentDAO(DocumentDAO documentDAO) |
void |
setDocumentTemplateDAO(DocumentTemplateDAO documentTemplateDAO) |
void |
setFolderDAO(FolderDAO folderDAO) |
void |
setIndexer(SearchEngine indexer) |
void |
setListenerManager(DocumentListenerManager listenerManager) |
void |
setStorer(Storer storer) |
void |
setUserDAO(UserDAO userDAO) |
void |
setVersionDAO(VersionDAO versionDAO) |
void |
unlock(long docId,
History transaction)
UNChecks out the given document
|
void |
update(Document doc,
Document docVO,
History transaction)
Updates an existing document and marks it to be re-indexed
|
public void setListenerManager(DocumentListenerManager listenerManager)
public void setDocumentDAO(DocumentDAO documentDAO)
public void setDocumentTemplateDAO(DocumentTemplateDAO documentTemplateDAO)
public void setIndexer(SearchEngine indexer)
public void checkin(long docId,
File file,
String filename,
boolean release,
Document docVO,
History transaction)
throws Exception
DocumentManagercheckin in interface DocumentManagerdocId - the document to be checked infile - of the new document versionfilename - new filename (can also be the old one)release - True if this is a new release(eg: 2.0) rather than a
subversion(eg: 1.1)docVO - The value object containing document's metadata applied
during the checkin (optional)transaction - entry to log the event, set the user and commentException - if an error occurs, this exception is thrownpublic void checkin(long docId,
InputStream content,
String filename,
boolean release,
Document docVO,
History transaction)
throws Exception
DocumentManagercheckin in interface DocumentManagerdocId - the document to be checked incontent - input stream pointing to the new document versionfilename - new filename (can also be the old one)release - True if this is a new release(eg: 2.0) rather than a
subversion(eg: 1.1)docVO - The value object containing document's metadata applied
during the checkin (optional)transaction - entry to log the event, set the user and commentException - if an error occurs, this exception is thrownpublic void checkout(long docId,
History transaction)
throws Exception
DocumentManagercheckout in interface DocumentManagerdocId - the document to be checked outException - if an error occurs, this exception is thrownpublic void lock(long docId,
int status,
History transaction)
throws Exception
DocumentManagerlock in interface DocumentManagerdocId - the document to be lockedstatus - the lock type (used to populate status attribute of the
document)transaction - entry to log the event (set the user)Exception - if an error occurs, this exception is thrownpublic void deleteFromIndex(Document doc)
deleteFromIndex in interface DocumentManagerdoc - public void reindex(long docId)
throws Exception
DocumentManagerreindex in interface DocumentManagerdocId - The document to be indexedException - if an error occurs, this exception is thrownpublic void update(Document doc, Document docVO, History transaction) throws Exception
DocumentManagerupdate in interface DocumentManagerdoc - The document to be updateddocVO - value object containing the new metadatatransaction - entry to log the event (set the user)Exception - if an error occurs, this exception is thrownpublic void moveToFolder(Document doc, Folder folder, History transaction) throws Exception
DocumentManagermoveToFolder in interface DocumentManagerdoc - The document to movefolder - The target foldertransaction - entry to log the event (set the user)Exceptionpublic Document create(File file, Document docVO, History transaction) throws Exception
DocumentManagercreate in interface DocumentManagerfile - The document's filedocVO - The value object containing the document's metadatatransaction - The trandaction metadata (remember to set the user and
the comment)Exceptionpublic Document create(InputStream content, Document docVO, History transaction) throws Exception
DocumentManagercreate in interface DocumentManagercontent - The document's contentdocVO - The value object containing the document's metadatatransaction - The transaction metadata (remember to set the user and
the comment)Exceptionpublic Document copyToFolder(Document doc, Folder folder, History transaction) throws Exception
DocumentManagercopyToFolder in interface DocumentManagerdoc - The document to movefolder - The target foldertransaction - entry to log the event (set the user)Exceptionpublic void unlock(long docId,
History transaction)
throws Exception
DocumentManagerunlock in interface DocumentManagerdocId - the document to be unchecked outtransaction - entry to log the eventException - if an error occurs, this exception is thrownpublic void makeImmutable(long docId,
History transaction)
throws Exception
DocumentManagermakeImmutable in interface DocumentManagertransaction - entry to log the event (set the user)Exceptionpublic void rename(Document doc, String newName, boolean title, History transaction) throws Exception
DocumentManagerrename in interface DocumentManagerdoc - The document to be renamednewName - The new title/filename of the documenttitle - True if the title must be renamed, False for the filenametransaction - entry to log the event (set the user)Exception - if an error occurs, this exception is thrownpublic Document createShortcut(Document doc, Folder folder, History transaction) throws Exception
DocumentManagercreateShortcut in interface DocumentManagerdoc - The document for which will be created the shortcutfolder - The target foldertransaction - entry to log the event (set the user)Exceptionpublic void setVersionDAO(VersionDAO versionDAO)
public void setStorer(Storer storer)
setStorer in interface DocumentManagerpublic void setConfig(ContextProperties config)
public void changeIndexingStatus(Document doc, int status)
DocumentManagerchangeIndexingStatus in interface DocumentManagerdoc - The document for which will be changed the indexer status.status - The new document indexer status.public void setUserDAO(UserDAO userDAO)
public void setFolderDAO(FolderDAO folderDAO)
public Version deleteVersion(long versionId, History transaction) throws Exception
DocumentManagerdeleteVersion in interface DocumentManagerversionId - The version to deleteExceptionCopyright © 2008-2014 Logical Objects. All Rights Reserved.