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(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Check on existing resource
|
org.alfresco.repo.security.authentication.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
|
org.alfresco.service.cmr.site.SiteService |
getSiteService()
Get site service
|
protected void |
postActivity(String path,
String siteId,
String tenantDomain,
boolean newlyCreated)
Create an activity post.
|
void |
putResource(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.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(ActivityPoster activityPoster) |
void |
setAuthenticationComponent(org.alfresco.repo.security.authentication.AuthenticationComponent authenticationComponent)
Set authentication component
|
void |
setDavHelper(WebDAVHelper davHelper) |
void |
setDavService(org.alfresco.service.cmr.webdav.WebDavService davService) |
void |
setShareUtils(ShareUtils shareUtils)
Set share utils
|
void |
setSiteService(org.alfresco.service.cmr.site.SiteService siteService)
Set site service
|
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, setWebDAVLockServicepublic void setAuthenticationComponent(org.alfresco.repo.security.authentication.AuthenticationComponent authenticationComponent)
authenticationComponent - the authentication component to set (AuthenticationComponent)public org.alfresco.repo.security.authentication.AuthenticationComponent getAuthenticationComponent()
public void setShareUtils(ShareUtils shareUtils)
shareUtils - the share utils to set (ShareUtils)public ShareUtils getShareUtils()
public void setSiteService(org.alfresco.service.cmr.site.SiteService siteService)
siteService - the site service to set (SiteService)public org.alfresco.service.cmr.site.SiteService getSiteService()
public String[] decomposeURL(String url, String alfrescoContext)
MethodHandlerdecomposeURL in interface MethodHandlerurl - url to decomposealfrescoContext - Alfresco ContextMethodHandler.decomposeURL(java.lang.String, java.lang.String)public boolean existResource(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
MethodHandlerexistResource in interface MethodHandlerrequest - HTTP requestresponse - HTTP responseMethodHandler.existResource(HttpServletRequest, HttpServletResponse)public void putResource(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
MethodHandlerputResource in interface MethodHandlerrequest - HTTP requestresponse - HTTP responseMethodHandler.putResource(HttpServletRequest, HttpServletResponse)public Document getDocument(String serviceName, String documentName, boolean force, String docVersion, EnumSet<GetOption> getOptionSet, int timeout)
MethodHandlergetDocument in interface MethodHandlerserviceName - 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
MethodHandlergetListDocuments in interface MethodHandlerserviceName - 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, falseVtiHandlerExceptionMethodHandler.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)
MethodHandleruncheckOutDocument in interface MethodHandlerserviceName - 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)
MethodHandlergetFileOpen in interface MethodHandlergetFileOpen in class AbstractAlfrescoMethodHandlersiteUrl - 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 *.htmsortField - specify the name of the field on which to sort (VtiSortField)sortDir - indicate an ascending (asc) or descending (desc) sort order (VtiSort)MethodHandler.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
WebDAVServerExceptionprotected void postActivity(String path, String siteId, String tenantDomain, boolean newlyCreated) throws WebDAVServerException
WebDAVServerExceptionpublic void setActivityPoster(ActivityPoster activityPoster)
setActivityPoster in interface ActivityPostProducerpublic void setDavService(org.alfresco.service.cmr.webdav.WebDavService davService)
public void setDavHelper(WebDAVHelper davHelper)
public WebDAVHelper getDavHelper()
Copyright © 2005–2014 Alfresco Software. All rights reserved.