public abstract class AbstractAlfrescoDwsServiceHandler extends Object implements DwsServiceHandler
| Modifier and Type | Field and Description |
|---|---|
protected org.alfresco.service.cmr.security.AuthenticationService |
authenticationService |
protected org.alfresco.service.cmr.repository.ContentService |
contentService |
protected org.alfresco.service.cmr.model.FileFolderService |
fileFolderService |
protected org.alfresco.service.cmr.repository.NodeService |
nodeService |
protected Map<String,String> |
pagesMap |
protected VtiPathHelper |
pathHelper |
protected org.alfresco.service.cmr.security.PermissionService |
permissionService |
protected org.alfresco.service.cmr.security.PersonService |
personService |
protected org.alfresco.service.transaction.TransactionService |
transactionService |
| Constructor and Description |
|---|
AbstractAlfrescoDwsServiceHandler() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDwsContentRecursive(org.alfresco.service.cmr.model.FileInfo dwsInfo,
List<DocumentBean> result,
String documetnLibraryURL)
Collect information about files and folders in current document workspace site
|
DwsBean |
createDws(String parentDwsUrl,
String name,
List<UserBean> users,
String title,
List<DocumentBean> documents,
String host,
String context,
SessionUser user)
Creates a document workspace site
|
void |
createFolder(String url)
Creates a subfolder in a document library of the current document workspace site
|
void |
deleteDws(String dwsUrl,
SessionUser user)
Deletes the current document workspace site and its contents
|
void |
deleteFolder(String url)
Deletes a subfolder from a document library of the current document workspace site
|
protected abstract SchemaBean |
doCreateDocumentSchemaBean(org.alfresco.service.cmr.model.FileInfo dwsFileInfo,
List<SchemaFieldBean> fields)
Create document schema
|
protected abstract String |
doCreateDws(String dwsName,
String title,
SessionUser user)
Creates a document workspace site
|
protected abstract SchemaBean |
doCreateLinkSchemaBean(org.alfresco.service.cmr.model.FileInfo dwsFileInfo,
List<SchemaFieldBean> fields)
Create link schema
|
protected abstract SchemaBean |
doCreateTasksSchemaBean(org.alfresco.service.cmr.model.FileInfo dwsFileInfo,
List<SchemaFieldBean> fields)
Create tasks schema
|
protected abstract void |
doDeleteDws(org.alfresco.service.cmr.model.FileInfo dwsFileInfo,
SessionUser user)
Deletes the current document workspace site and its contents
|
protected abstract void |
doGetDwsContentRecursive(org.alfresco.service.cmr.model.FileInfo fileInfo,
List<DocumentBean> dwsContent)
Get document workspace site content
|
protected abstract String |
doGetDwsCreationUrl(String parentUrl,
String title)
Get a new document workspace site creation url
|
protected abstract List<DocumentBean> |
doGetDwsDocuments(org.alfresco.service.cmr.model.FileInfo fileInfo)
Get the document list
|
protected abstract List<LinkBean> |
doGetDwsLinks(org.alfresco.service.cmr.model.FileInfo fileInfo)
Get document workspace site links
|
protected abstract String |
doGetLastUpdate(org.alfresco.service.cmr.model.FileInfo dwsFileInfo)
Resolves site's last update time as string
|
protected abstract org.alfresco.service.namespace.QName |
doGetModelType()
Get type of alfresco document workspace site (Folder or Site)
|
protected abstract DwsBean |
doGetResultBean(String parentUrl,
String dwsUrl,
String host,
String context)
Get new document workspace site description
|
protected abstract List<Permission> |
doGetUsersPermissions(org.alfresco.service.cmr.model.FileInfo dwsFileInfo)
Get users permissions
|
protected abstract List<MemberBean> |
doListDwsMembers(org.alfresco.service.cmr.model.FileInfo dwsFileInfo)
Get document workspace site users
|
protected abstract void |
doRemoveDwsUser(org.alfresco.service.cmr.model.FileInfo dwsFileInfo,
String authority)
Removes the specified user from the list of users for the current document workspace site
|
protected abstract void |
doUpdateDwsDataDelete(LinkBean linkBean,
String dws)
Deletes link in site links container
|
protected abstract LinkBean |
doUpdateDwsDataNew(LinkBean linkBean,
String dws)
Creates new link in site links container
|
protected abstract void |
doUpdateDwsDataUpdate(LinkBean linkBean,
String dws)
Updates given link in site links container
|
protected abstract boolean |
dwsExists(String name) |
protected UserBean |
getCurrentUser()
Get current user
|
DwsData |
getDwsData(String document,
String lastUpdate)
Returns information about a document workspace site and the lists it contains
|
DwsMetadata |
getDWSMetaData(String document,
String id,
boolean minimal)
Returns information about a document workspace site and the lists it contains
|
protected String |
getDwsPermissionsUrl(String dwsUrl) |
Map<String,String> |
getPagesMap()
Get pages map
|
abstract WorkspaceType |
getWorkspaceType(org.alfresco.service.cmr.model.FileInfo dwsNode) |
void |
removeDwsUser(String dwsUrl,
String id)
Removes the specified user from the list of users for the current document workspace site
|
protected String |
removeIllegalCharacters(String value)
Remove illegal characters from string
|
void |
renameDws(String oldDwsUrl,
String title)
Changes the title of the current document workspace site
|
void |
setAuthenticationService(org.alfresco.service.cmr.security.AuthenticationService authenticationService)
Set authentication service
|
void |
setContentService(org.alfresco.service.cmr.repository.ContentService contentService)
Set content service
|
void |
setFileFolderService(org.alfresco.service.cmr.model.FileFolderService fileFolderService)
Set file-folder service
|
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
Set node service
|
void |
setPagesMap(Map<String,String> pagesMap)
Set pages map
|
void |
setPathHelper(VtiPathHelper pathHelper)
Set path helper
|
void |
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
Set permission service
|
void |
setPersonService(org.alfresco.service.cmr.security.PersonService personService)
Set person service
|
void |
setTransactionService(org.alfresco.service.transaction.TransactionService transactionService)
Set transaction service
|
LinkBean |
updateDwsData(LinkBean linkBean,
CAMLMethod method,
String dws)
Update document workspace site data such as links
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanCreateDwsUrl, handleRedirectprotected org.alfresco.service.cmr.model.FileFolderService fileFolderService
protected org.alfresco.service.cmr.repository.NodeService nodeService
protected org.alfresco.service.transaction.TransactionService transactionService
protected org.alfresco.service.cmr.security.PermissionService permissionService
protected org.alfresco.service.cmr.security.AuthenticationService authenticationService
protected org.alfresco.service.cmr.security.PersonService personService
protected org.alfresco.service.cmr.repository.ContentService contentService
protected VtiPathHelper pathHelper
public void setPagesMap(Map<String,String> pagesMap)
pagesMap - the pages map to setpublic void setPathHelper(VtiPathHelper pathHelper)
pathHelper - the path helper to set (VtiPathHelper)public void setFileFolderService(org.alfresco.service.cmr.model.FileFolderService fileFolderService)
fileFolderService - the file-folder service to set (FileFolderService)public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
nodeService - the node service to set (NodeService)public void setTransactionService(org.alfresco.service.transaction.TransactionService transactionService)
transactionService - the transaction service to set (TransactionService)public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
permissionService - the permission service to set (PermissionService)public void setAuthenticationService(org.alfresco.service.cmr.security.AuthenticationService authenticationService)
authenticationService - the authentication service to set (AuthenticationService)public void setPersonService(org.alfresco.service.cmr.security.PersonService personService)
personService - the person service to set (PersonService)public void setContentService(org.alfresco.service.cmr.repository.ContentService contentService)
contentService - the content service to set (ContentService)public DwsMetadata getDWSMetaData(String document, String id, boolean minimal) throws Exception
DwsServiceHandlergetDWSMetaData in interface DwsServiceHandlerid - an optional document globally unique identifier (GUID)minimal - determines whether the output includes information about the schemas, lists, documents, links, and tasks lists of a document workspace siteDwsMetadata)ExceptionDwsServiceHandler.getDWSMetaData(java.lang.String, java.lang.String, boolean)public abstract WorkspaceType getWorkspaceType(org.alfresco.service.cmr.model.FileInfo dwsNode)
public DwsData getDwsData(String document, String lastUpdate) throws org.alfresco.repo.site.SiteDoesNotExistException
DwsServiceHandlergetDwsData in interface DwsServiceHandlerlastUpdate - returned in the results of a previous call to the GetDwsData or GetDwsMetadata methodDwsData)org.alfresco.repo.site.SiteDoesNotExistExceptionDwsServiceHandler.getDwsData(java.lang.String, java.lang.String)public DwsBean createDws(String parentDwsUrl, String name, List<UserBean> users, String title, List<DocumentBean> documents, String host, String context, SessionUser user)
DwsServiceHandlercreateDws in interface DwsServiceHandlerparentDwsUrl - url of the parent dwsname - the optional URL of the new document workspace site. If an empty string is passed, the URL of the new SharePoint site is based on the titleusers - an optional list of users to add to the new SharePoint sitetitle - the title of the new document workspace sitedocuments - an optional list of documents. Used by Microsoft Office Outlook 2003 when adding shared attachments to a new document workspace sitehost - application hostcontext - application contextuser - current userDwsBean)DwsServiceHandler.createDws(java.lang.String, java.lang.String, java.util.List, java.lang.String, java.util.List, java.lang.String,
java.lang.String, org.alfresco.repo.SessionUser)public void deleteDws(String dwsUrl, SessionUser user)
DwsServiceHandlerdeleteDws in interface DwsServiceHandlerdwsUrl - url of dws to deleteuser - current userDwsServiceHandler.deleteDws(java.lang.String, org.alfresco.repo.SessionUser)public void createFolder(String url)
DwsServiceHandlercreateFolder in interface DwsServiceHandlerurl - the proposed site-based URL of the folder to createDwsServiceHandler.createFolder(java.lang.String)public void deleteFolder(String url)
DwsServiceHandlerdeleteFolder in interface DwsServiceHandlerurl - The site-based URL of the folder to deleteDwsServiceHandler.deleteFolder(java.lang.String)public void renameDws(String oldDwsUrl, String title)
DwsServiceHandlerrenameDws in interface DwsServiceHandleroldDwsUrl - url of dws to renametitle - the new title for the document workspace siteDwsServiceHandler.renameDws(java.lang.String, java.lang.String)public void removeDwsUser(String dwsUrl, String id)
DwsServiceHandlerremoveDwsUser in interface DwsServiceHandlerdwsUrl - URL of document workspace siteid - the ID of the user to be removed from the list of usersDwsServiceHandler.removeDwsUser(java.lang.String, java.lang.String)protected abstract String doGetDwsCreationUrl(String parentUrl, String title)
parentUrl - url of the parent dwstitle - the title of the new document workspace siteprotected abstract String doCreateDws(String dwsName, String title, SessionUser user) throws org.apache.commons.httpclient.HttpException, IOException
dwsName - TODOtitle - the title of the new document workspace siteuser - current userorg.apache.commons.httpclient.HttpExceptionIOExceptionprotected abstract boolean dwsExists(String name)
name - true if the specified DWS exists.protected abstract DwsBean doGetResultBean(String parentUrl, String dwsUrl, String host, String context)
parentUrl - url of the parent document workspace sitedwsUrl - url of the document workspace sitehost - application hostcontext - application contextprotected abstract void doDeleteDws(org.alfresco.service.cmr.model.FileInfo dwsFileInfo,
SessionUser user)
throws org.apache.commons.httpclient.HttpException,
IOException
dwsFileInfo - document workspace site file info (FileInfo)user - current userorg.apache.commons.httpclient.HttpExceptionIOExceptionprotected abstract void doRemoveDwsUser(org.alfresco.service.cmr.model.FileInfo dwsFileInfo,
String authority)
dwsFileInfo - document workspace site file info (FileInfo)authority - name of the user to be removed from the list of usersprotected abstract List<MemberBean> doListDwsMembers(org.alfresco.service.cmr.model.FileInfo dwsFileInfo)
dwsFileInfo - document workspace site file info (FileInfo)protected abstract void doGetDwsContentRecursive(org.alfresco.service.cmr.model.FileInfo fileInfo,
List<DocumentBean> dwsContent)
fileInfo - document workspace site file info (FileInfo)dwsContent - list of beans with document workspace site content informations (DocumentBean)protected abstract List<LinkBean> doGetDwsLinks(org.alfresco.service.cmr.model.FileInfo fileInfo)
fileInfo - document workspace site file info (FileInfo)LinkBean)protected abstract List<DocumentBean> doGetDwsDocuments(org.alfresco.service.cmr.model.FileInfo fileInfo)
fileInfo - document workspace site file info (FileInfo)protected abstract org.alfresco.service.namespace.QName doGetModelType()
protected abstract List<Permission> doGetUsersPermissions(org.alfresco.service.cmr.model.FileInfo dwsFileInfo)
dwsFileInfo - document workspace site file info (FileInfo)protected abstract SchemaBean doCreateDocumentSchemaBean(org.alfresco.service.cmr.model.FileInfo dwsFileInfo, List<SchemaFieldBean> fields)
dwsFileInfo - document workspace site file info (FileInfo)fields - system fields of the document (SchemaFieldBean)protected abstract SchemaBean doCreateLinkSchemaBean(org.alfresco.service.cmr.model.FileInfo dwsFileInfo, List<SchemaFieldBean> fields)
dwsFileInfo - document workspace site file info (FileInfo)fields - system fields of the link (SchemaFieldBean)protected abstract SchemaBean doCreateTasksSchemaBean(org.alfresco.service.cmr.model.FileInfo dwsFileInfo, List<SchemaFieldBean> fields)
dwsFileInfo - document workspace site file info (FileInfo)fields - system fields of the link (SchemaFieldBean)protected abstract String doGetLastUpdate(org.alfresco.service.cmr.model.FileInfo dwsFileInfo)
dwsFileInfo - fileInfo of siteprotected UserBean getCurrentUser()
protected void addDwsContentRecursive(org.alfresco.service.cmr.model.FileInfo dwsInfo,
List<DocumentBean> result,
String documetnLibraryURL)
dwsInfo - document workspace site file info (FileInfo)result - list of beans with document workspace site content informations (DocumentBean)documetnLibraryURL - relative url on document library folder on siteprotected String removeIllegalCharacters(String value)
value - input stringpublic LinkBean updateDwsData(LinkBean linkBean, CAMLMethod method, String dws)
DwsServiceHandlerupdateDwsData in interface DwsServiceHandlerlinkBean - (LinkBean)dws - document workspace site nameorg.alfresco.module.vti.handler.DwsServiceHandler#updateDwsData(org.alfresco.module.vti.metadata.model.LinkBean, CAMLMethod, java.lang.String))protected abstract LinkBean doUpdateDwsDataNew(LinkBean linkBean, String dws)
linkBean - linkBean that should be createddws - site nameprotected abstract void doUpdateDwsDataUpdate(LinkBean linkBean, String dws)
linkBean - linkBean that should be updateddws - site nameCopyright © 2005–2014 Alfresco Software. All rights reserved.