public class AlfrescoMethodHandler extends AbstractAlfrescoMethodHandler implements ActivityPostProducer
Constructor and Description |
---|
AlfrescoMethodHandler() |
Modifier and Type | Method and Description |
---|---|
String[] |
decomposeURL(String url,
String alfrescoContext)
Decompose the URL into its parts, eg /foo/bar.doc -> { "foo", "bar.doc" }
|
boolean |
existResource(HttpServletRequest request,
HttpServletResponse response)
Check on existing resource
|
AuthenticationComponent |
getAuthenticationComponent()
Get authentication component
|
WebDAVHelper |
getDavHelper() |
Document |
getDocument(String serviceName,
String documentName,
boolean force,
String docVersion,
EnumSet<GetOption> getOptionSet,
int timeout)
Retrieves the specified document for viewing
|
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
|
DocsMetaInfo |
getListDocuments(String serviceName,
boolean listHiddenDocs,
boolean listExplorerDocs,
String platform,
String initialURL,
boolean listRecurse,
boolean listLinkInfo,
boolean listFolders,
boolean listFiles,
boolean listIncludeParent,
boolean listDerived,
boolean listBorders,
boolean validateWelcomeNames,
Map<String,Object> folderList,
boolean listChildWebs)
Provides a list of the files, folders, and subsites complete with meta-information for each file contained in the initialUrl parameter of the specified Web site.
|
ShareUtils |
getShareUtils()
Get share utils
|
SiteService |
getSiteService()
Get site service
|
void |
init() |
protected void |
postActivity(String path,
String siteId,
String tenantDomain,
boolean newlyCreated)
Create an activity post.
|
void |
putResource(HttpServletRequest request,
HttpServletResponse response)
Update the content of existing resource or create empty locked resource if it doesn't exist
|
protected void |
reportUploadEvent(String path,
String siteId,
String tenantDomain,
boolean newlyCreated,
String mimeType,
long fileSize)
TODO: may be expanded to a proper event handler with listener registration.
|
void |
setActivityPoster(WebDAVActivityPoster activityPoster) |
void |
setAuthenticationComponent(AuthenticationComponent authenticationComponent)
Set authentication component
|
void |
setDavHelper(WebDAVHelper davHelper) |
void |
setDavService(WebDavService davService) |
void |
setEncryptTempFiles(Boolean encryptTempFiles) |
void |
setMaxContentSize(Long maxContentSize) |
void |
setMemoryThreshold(Integer memoryThreshold) |
void |
setShareUtils(ShareUtils shareUtils)
Set share utils
|
void |
setSiteService(SiteService siteService)
Set site service
|
void |
setStreamFactory(org.apache.chemistry.opencmis.server.shared.TempStoreOutputStreamFactory streamFactory) |
void |
setTempDirectoryName(String tempDirectoryName) |
void |
setTenantService(org.alfresco.repo.tenant.TenantService tenantService) |
DocMetaInfo |
uncheckOutDocument(String serviceName,
String documentName,
boolean force,
Date timeCheckedOut,
boolean rlsshortterm,
boolean validateWelcomeNames)
Undoes a check-out of a file.
|
assertFile, assertFolder, assertRemovableDocument, assertValidFileInfo, checkInDocument, checkout, checkOutDocument, createDirectory, getAuthenticationService, getCheckOutCheckInService, getContentService, getDialogMetaInfo, getDictionaryService, getDocsMetaInfo, getDocumentHelper, getFileFolderService, getLockService, getMimetypeService, getNodeService, getPathHelper, getPermissionService, getServertimeZone, getTransactionService, getUserName, getVersionService, moveDocument, putDocument, removeDocuments, setAuthenticationService, setCheckOutCheckInService, setContentService, setDictionaryService, setDocMetaInfo, setDocumentHelper, setFileFolderService, setMimetypeService, setNodeService, setPathHelper, setPermissionService, setTransactionService, setVersionService, setWebDAVLockService
public void init()
public void setStreamFactory(org.apache.chemistry.opencmis.server.shared.TempStoreOutputStreamFactory streamFactory)
public void setEncryptTempFiles(Boolean encryptTempFiles)
public void setTempDirectoryName(String tempDirectoryName)
public void setMemoryThreshold(Integer memoryThreshold)
public void setMaxContentSize(Long maxContentSize)
public void setAuthenticationComponent(AuthenticationComponent authenticationComponent)
authenticationComponent
- the authentication component to set (AuthenticationComponent
)public AuthenticationComponent getAuthenticationComponent()
public void setShareUtils(ShareUtils shareUtils)
shareUtils
- the share utils to set (ShareUtils
)public void setActivityPoster(WebDAVActivityPoster activityPoster)
setActivityPoster
in interface ActivityPostProducer
public void setDavService(WebDavService davService)
public void setDavHelper(WebDAVHelper davHelper)
public WebDAVHelper getDavHelper()
public void setTenantService(org.alfresco.repo.tenant.TenantService tenantService)
tenantService
- the tenantService to setpublic ShareUtils getShareUtils()
public void setSiteService(SiteService siteService)
siteService
- the site service to set (SiteService
)public SiteService getSiteService()
public String[] decomposeURL(String url, String alfrescoContext)
MethodHandler
decomposeURL
in interface MethodHandler
url
- url to decomposealfrescoContext
- Alfresco ContextMethodHandler.decomposeURL(java.lang.String, java.lang.String)
public boolean existResource(HttpServletRequest request, HttpServletResponse response)
MethodHandler
existResource
in interface MethodHandler
request
- HTTP requestresponse
- HTTP responseMethodHandler.existResource(HttpServletRequest, HttpServletResponse)
public void putResource(HttpServletRequest request, HttpServletResponse response)
MethodHandler
putResource
in interface MethodHandler
request
- HTTP requestresponse
- HTTP responseMethodHandler.putResource(HttpServletRequest, HttpServletResponse)
public Document getDocument(String serviceName, String documentName, boolean force, String docVersion, EnumSet<GetOption> getOptionSet, int timeout)
MethodHandler
getDocument
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 userdocVersion
- version number other than the current version of a documentgetOptionSet
- specifies how documents are checked out from source control. The possible values are:
<b>none</b> Do not check out the file. <b>chkoutExclusive</b> Check out the file exclusively, which fails if the file is already checked out by another user. <b>chkoutNonExclusive</b> Check out the file non-exclusively, if the source control system in use is configured to allow non-exclusive check-outs.
timeout
- provides the number of seconds a short-term lock is reserved. Within this time, the client computer must renew its lock to retain the lockMethodHandler.getDocument(java.lang.String, java.lang.String, boolean, java.lang.String, java.util.EnumSet, int)
public DocsMetaInfo getListDocuments(String serviceName, boolean listHiddenDocs, boolean listExplorerDocs, String platform, String initialURL, boolean listRecurse, boolean listLinkInfo, boolean listFolders, boolean listFiles, boolean listIncludeParent, boolean listDerived, boolean listBorders, boolean validateWelcomeNames, Map<String,Object> folderList, boolean listChildWebs) throws VtiHandlerException
MethodHandler
getListDocuments
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, falselistExplorerDocs
- <i>true</i> to generate a list of the task list files (_x_todo.xml and _x_todh.xml). <i>false</i>, no task list data is sent from the originating server
platform
- identifies the operating system of the clientinitialURL
- URL of the folder from which to initially list documents or, if no folder is given, either "" or "/" to indicate the root folder of the Web sitelistRecurse
- specifies if recursively list the subfolders of the service_name Web site in the return valuelistLinkInfo
- specifies whether or not the return value of the method contains information about the links from the current pagelistFolders
- true to include the names and meta-information of the folders in the service_name Web site; otherwise, falselistFiles
- true to list the metadata of files contained in each directory represented in the return code; otherwise, falselistIncludeParent
- specifies whether or not return parent directorylistDerived
- sending this parameter generates a list of files in _derived folderslistBorders
- true to generate a list of contents of the _borders directory that contains shared border pages; otherwise, falsefolderList
- map contains folder URLs as keysr and a time stamp as values corresponding to the time the client computer last posted the list documents method to request
a full list of the documents contained in that folder.listChildWebs
- true if folder represents a web site; otherwise, falseVtiHandlerException
MethodHandler.getListDocuments(java.lang.String, boolean, boolean, java.lang.String, java.lang.String, boolean, boolean, boolean,
boolean, boolean, boolean, boolean, boolean, java.util.Map, boolean)
public DocMetaInfo uncheckOutDocument(String serviceName, String documentName, boolean force, Date timeCheckedOut, boolean rlsshortterm, boolean validateWelcomeNames)
MethodHandler
uncheckOutDocument
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 usertimeCheckedOut
- The time and date at which the current object was last checked outrlsshortterm
- true if there is a short-term lock on the file; otherwise, falseMethodHandler.uncheckOutDocument(java.lang.String, java.lang.String, boolean, java.util.Date, boolean, boolean)
public DialogsMetaInfo getFileOpen(String siteUrl, String location, List<String> fileDialogFilterValue, String rootFolder, VtiSortField sortField, VtiSort sortDir, String view)
MethodHandler
getFileOpen
in interface MethodHandler
getFileOpen
in class AbstractAlfrescoMethodHandler
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)
protected void reportUploadEvent(String path, String siteId, String tenantDomain, boolean newlyCreated, String mimeType, long fileSize) throws WebDAVServerException
WebDAVServerException
protected void postActivity(String path, String siteId, String tenantDomain, boolean newlyCreated) throws WebDAVServerException
WebDAVServerException
Copyright © 2005–2017 Alfresco Software. All rights reserved.