public abstract class AbstractAlfrescoMethodHandler extends Object implements MethodHandler
Constructor and Description |
---|
AbstractAlfrescoMethodHandler() |
Modifier and Type | Method and Description |
---|---|
static void |
assertFile(FileInfo fileFileInfo)
Asserts "this file info of content node reference"
|
static void |
assertFolder(FileInfo folderFileInfo)
Asserts "this file info of folder node reference"
|
static void |
assertRemovableDocument(DocumentStatus documentStatus)
Asserts "document with this status is removable"
|
static void |
assertValidFileInfo(FileInfo fileInfo)
Asserts "this file info isn't null"
|
DocMetaInfo |
checkInDocument(String serviceName,
String documentName,
String comment,
boolean keepCheckedOut,
Date timeCheckedout,
boolean validateWelcomeNames)
Check in document method
|
FileInfo |
checkout(FileInfo documentFileInfo,
int timeout)
Helper method for short-term or long-term checkouts
|
DocMetaInfo |
checkOutDocument(String serviceName,
String documentName,
int force,
int timeout,
boolean validateWelcomeNames)
Check out the file from a document library.
|
boolean |
createDirectory(String serviceName,
DocMetaInfo dir)
Creates a folder for the current Web site
|
AuthenticationService |
getAuthenticationService()
Get authentication service
|
CheckOutCheckInService |
getCheckOutCheckInService()
Get check out check in service
|
ContentService |
getContentService()
Get content service
|
protected DialogMetaInfo |
getDialogMetaInfo(FileInfo fileInfo)
Returns DialogMetaInfo for FileInfo
|
org.alfresco.service.cmr.dictionary.DictionaryService |
getDictionaryService() |
DocsMetaInfo |
getDocsMetaInfo(String serviceName,
boolean listHiddenDocs,
boolean listLinkInfo,
boolean validateWelcomeNames,
List<String> urlList)
Provides the server with the standard meta-information concerning the designated file
|
VtiDocumentHelper |
getDocumentHelper()
Get document helper
|
FileFolderService |
getFileFolderService()
Get file folder service
|
DialogsMetaInfo |
getFileOpen(String siteUrl,
String location,
List<String> fileDialogFilterValue,
String rootFolder,
VtiSortField sortField,
VtiSort sortDir,
String view)
Opens a view of the document libraries within a site, of a specific document library, or of a folder within a document library
|
WebDAVLockService |
getLockService()
Get lock service
|
org.alfresco.service.cmr.repository.MimetypeService |
getMimetypeService() |
org.alfresco.service.cmr.repository.NodeService |
getNodeService()
Get node service
|
VtiPathHelper |
getPathHelper()
Get path helper
|
org.alfresco.service.cmr.security.PermissionService |
getPermissionService()
Get permission service
|
String |
getServertimeZone()
Get server time zone
|
TransactionService |
getTransactionService()
Get transaction service
|
String |
getUserName()
Get user name
|
VersionService |
getVersionService()
Get version service
|
DocsMetaInfo |
moveDocument(String serviceName,
String oldURL,
String newURL,
List<String> urlList,
EnumSet<RenameOption> renameOptionSet,
EnumSet<PutOption> putOptionSet,
boolean docopy,
boolean validateWelcomeNames)
Rename the selected document to the new name
|
DocMetaInfo |
putDocument(String serviceName,
Document document,
EnumSet<PutOption> putOptionSet,
String comment,
boolean keepCheckedOut,
boolean validateWelcomeNames)
Writes a file to a directory in an existing Web site
|
DocsMetaInfo |
removeDocuments(String serviceName,
List<String> urlList,
List<Date> timeTokens,
boolean validateWelcomeNames)
Deletes the specified documents or folders from the Web site
|
void |
setAuthenticationService(AuthenticationService authenticationService)
Set authentication service
|
void |
setCheckOutCheckInService(CheckOutCheckInService checkOutCheckInService)
Set checkout-checkin service
|
void |
setContentService(ContentService contentService)
Set content service
|
void |
setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService) |
void |
setDocMetaInfo(FileInfo fileInfo,
DocMetaInfo docMetaInfo)
Sets metadata for docMetaInfo
|
void |
setDocumentHelper(VtiDocumentHelper checkoutHelper)
Set document helper
|
void |
setFileFolderService(FileFolderService fileFolderService)
Set file folder service
|
void |
setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Set node service
|
void |
setPathHelper(VtiPathHelper pathHelper)
Set path helper
|
void |
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
Set permission service
|
void |
setTransactionService(TransactionService transactionService)
Set transaction service
|
void |
setVersionService(VersionService versionService)
Set version service
|
void |
setWebDAVLockService(WebDAVLockService webDAVLockService)
Set lock service
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
decomposeURL, existResource, getDocument, getListDocuments, putResource, uncheckOutDocument
public void setTransactionService(TransactionService transactionService)
transactionService
- the transaction service to set (TransactionService
)public void setContentService(ContentService contentService)
contentService
- the content service to set (ContentService
)public void setWebDAVLockService(WebDAVLockService webDAVLockService)
webDAVLockService
- the lock service to setpublic void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService
- the node service to set (NodeService
)public void setCheckOutCheckInService(CheckOutCheckInService checkOutCheckInService)
checkOutCheckInService
- the checkout-checkin service to set (CheckOutCheckInService
)public void setFileFolderService(FileFolderService fileFolderService)
fileFolderService
- the file folder service to set (FileFolderService
)public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
permissionService
- the permission service to set (PermissionService
)public void setAuthenticationService(AuthenticationService authenticationService)
authenticationService
- the authentication service to set (AuthenticationService
)public void setVersionService(VersionService versionService)
versionService
- the version service to set (VersionService
)public void setMimetypeService(org.alfresco.service.cmr.repository.MimetypeService mimetypeService)
public org.alfresco.service.cmr.repository.MimetypeService getMimetypeService()
public org.alfresco.service.cmr.dictionary.DictionaryService getDictionaryService()
public void setDictionaryService(org.alfresco.service.cmr.dictionary.DictionaryService dictionaryService)
public void setDocumentHelper(VtiDocumentHelper checkoutHelper)
checkoutHelper
- the document helper to set (VtiDocumentHelper
)public void setPathHelper(VtiPathHelper pathHelper)
pathHelper
- the path helper to set (VtiPathHelper
)public org.alfresco.service.cmr.repository.NodeService getNodeService()
public CheckOutCheckInService getCheckOutCheckInService()
public FileFolderService getFileFolderService()
public org.alfresco.service.cmr.security.PermissionService getPermissionService()
public AuthenticationService getAuthenticationService()
public VersionService getVersionService()
public WebDAVLockService getLockService()
public ContentService getContentService()
public TransactionService getTransactionService()
public VtiDocumentHelper getDocumentHelper()
public VtiPathHelper getPathHelper()
public DocMetaInfo checkInDocument(String serviceName, String documentName, String comment, boolean keepCheckedOut, Date timeCheckedout, boolean validateWelcomeNames)
MethodHandler
checkInDocument
in interface MethodHandler
serviceName
- specifies the URL of the Web site that a method should act upondocumentName
- the site-relative URL of the current document relative to the root directory of the Web sitecomment
- check-in commentskeepCheckedOut
- used when source control is in use. true to check in the specified document to source control and immediately check it back out. false
to only check the document in to source control.timeCheckedout
- the time and date at which the current object was last checked outMethodHandler.checkInDocument(java.lang.String, java.lang.String, java.lang.String, boolean, java.util.Date, boolean)
public DocMetaInfo checkOutDocument(String serviceName, String documentName, int force, int timeout, boolean validateWelcomeNames)
MethodHandler
checkOutDocument
in interface MethodHandler
serviceName
- specifies the URL of the Web site that a method should act upondocumentName
- the site-relative URL of the current document relative to the root directory of the Web siteforce
- parameter used with source control to undo check-out of a file that is checked out by some other usertimeout
- Provides the number of seconds a short-term lock is reservedMethodHandler.checkOutDocument(java.lang.String, java.lang.String, int, int, boolean)
public boolean createDirectory(String serviceName, DocMetaInfo dir)
MethodHandler
createDirectory
in interface MethodHandler
serviceName
- specifies the URL of the Web site that a method should act upondir
- url of the directory to created (DocMetaInfo
)MethodHandler.createDirectory(java.lang.String, org.alfresco.module.vti.metadata.model.DocMetaInfo)
public DocsMetaInfo getDocsMetaInfo(String serviceName, boolean listHiddenDocs, boolean listLinkInfo, boolean validateWelcomeNames, List<String> urlList)
MethodHandler
getDocsMetaInfo
in interface MethodHandler
serviceName
- specifies the URL of the Web site that a method should act uponlistHiddenDocs
- true to list hidden documents in a Web site; otherwise, falselistLinkInfo
- Specifies whether or not the return value of the method contains information about the links from the current pageurlList
- the list of site-relative URLsMethodHandler.getDocsMetaInfo(java.lang.String, boolean, boolean, boolean, java.util.List)
public DialogsMetaInfo getFileOpen(String siteUrl, String location, List<String> fileDialogFilterValue, String rootFolder, VtiSortField sortField, VtiSort sortDir, String view)
MethodHandler
getFileOpen
in interface MethodHandler
siteUrl
- specifies the server-relative URL of a sitelocation
- specifies the site-relative URL of a document library or of a folder or file within a document libraryfileDialogFilterValue
- specifies the file type extension by which to filter the view in the file dialog box. For example, *.doc, *.txt, or *.htmrootFolder
- StringsortField
- specify the name of the field on which to sort (VtiSortField
)sortDir
- indicate an ascending (asc) or descending (desc) sort order (VtiSort
)view
- StringMethodHandler.getFileOpen(java.lang.String, java.lang.String, java.util.List, java.lang.String,
org.alfresco.module.vti.metadata.dic.VtiSortField, org.alfresco.module.vti.metadata.dic.VtiSort, java.lang.String)
public String getServertimeZone()
MethodHandler
getServertimeZone
in interface MethodHandler
MethodHandler.getServertimeZone()
public String getUserName()
MethodHandler
getUserName
in interface MethodHandler
MethodHandler.getUserName()
public DocsMetaInfo moveDocument(String serviceName, String oldURL, String newURL, List<String> urlList, EnumSet<RenameOption> renameOptionSet, EnumSet<PutOption> putOptionSet, boolean docopy, boolean validateWelcomeNames)
MethodHandler
moveDocument
in interface MethodHandler
serviceName
- specifies the URL of the Web site that a method should act uponoldURL
- the previous URL for a document that has changed names or directory location in the Web sitenewURL
- the new URL for a document that has changed names or directory locations in the Web site.urlList
- The list of site-relative URLs for the current methodrenameOptionSet
- parameter that specifies how links should handle to and from the new page.putOptionSet
- enables the server to overwrite an existing file if the value is set to overwrite and disallows overwrites if the value is set to editdocopy
- true to copy the file to the destination; false to move the file to the destinationvalidateWelcomeNames
- booleanMethodHandler.moveDocument(java.lang.String, java.lang.String, java.lang.String, java.util.List, java.util.EnumSet, java.util.EnumSet,
boolean, boolean)
public DocMetaInfo putDocument(String serviceName, Document document, EnumSet<PutOption> putOptionSet, String comment, boolean keepCheckedOut, boolean validateWelcomeNames)
MethodHandler
putDocument
in interface MethodHandler
serviceName
- specifies the URL of the Web site that a method should act upondocument
- document to createputOptionSet
- enables the server to overwrite an existing file if the value is set to overwrite and disallows overwrites if the value is set to editcomment
- provides a comment for the file being uploadedkeepCheckedOut
- true to check in the specified document to source control and immediately check it back out. false to only check the document in to
source control.MethodHandler.putDocument(java.lang.String, org.alfresco.module.vti.metadata.model.Document, java.util.EnumSet, java.lang.String,
boolean, boolean)
public DocsMetaInfo removeDocuments(String serviceName, List<String> urlList, List<Date> timeTokens, boolean validateWelcomeNames)
MethodHandler
removeDocuments
in interface MethodHandler
serviceName
- specifies the URL of the Web site that a method should act uponurlList
- the list of site-relative URLs for the current methodtimeTokens
- formerly contained a vector of time stamp valuesMethodHandler.removeDocuments(java.lang.String, java.util.List, java.util.List, boolean)
public void setDocMetaInfo(FileInfo fileInfo, DocMetaInfo docMetaInfo)
fileInfo
- file info for document, folder or working copy (FileInfo
)docMetaInfo
- meta info (DocMetaInfo
)protected DialogMetaInfo getDialogMetaInfo(FileInfo fileInfo)
fileInfo
- file info (FileInfo
)public FileInfo checkout(FileInfo documentFileInfo, int timeout)
documentFileInfo
- file info for document (FileInfo
)timeout
- timeout in minutes for short-term checkout, if equals 0, then uses long-term checkoutpublic static void assertRemovableDocument(DocumentStatus documentStatus)
documentStatus
- document status (DocumentStatus
)public static void assertFile(FileInfo fileFileInfo) throws VtiHandlerException
fileFileInfo
- file info (FileInfo
)VtiHandlerException
- thrown if the file info isn't file file infopublic static void assertFolder(FileInfo folderFileInfo) throws VtiHandlerException
folderFileInfo
- file info (FileInfo
)VtiHandlerException
- thrown if the file info isn't folder file infopublic static void assertValidFileInfo(FileInfo fileInfo) throws VtiHandlerException
fileInfo
- file info (FileInfo
)VtiHandlerException
- thrown if the file info is nullCopyright © 2005–2017 Alfresco Software. All rights reserved.