public abstract class AbstractAlfrescoDwsServiceHandler extends Object implements DwsServiceHandler
Modifier and Type | Field and Description |
---|---|
protected AuthenticationService |
authenticationService |
protected ContentService |
contentService |
protected 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 PersonService |
personService |
protected TransactionService |
transactionService |
Constructor and Description |
---|
AbstractAlfrescoDwsServiceHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
addDwsContentRecursive(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(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(FileInfo dwsFileInfo,
List<SchemaFieldBean> fields)
Create link schema
|
protected abstract SchemaBean |
doCreateTasksSchemaBean(FileInfo dwsFileInfo,
List<SchemaFieldBean> fields)
Create tasks schema
|
protected abstract void |
doDeleteDws(FileInfo dwsFileInfo,
SessionUser user)
Deletes the current document workspace site and its contents
|
protected abstract void |
doGetDwsContentRecursive(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(FileInfo fileInfo)
Get the document list
|
protected abstract List<LinkBean> |
doGetDwsLinks(FileInfo fileInfo)
Get document workspace site links
|
protected abstract String |
doGetLastUpdate(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(FileInfo dwsFileInfo)
Get users permissions
|
protected abstract List<MemberBean> |
doListDwsMembers(FileInfo dwsFileInfo)
Get document workspace site users
|
protected abstract void |
doRemoveDwsUser(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(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(AuthenticationService authenticationService)
Set authentication service
|
void |
setContentService(ContentService contentService)
Set content service
|
void |
setFileFolderService(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(PersonService personService)
Set person service
|
void |
setTransactionService(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, wait
canCreateDwsUrl, handleRedirect
protected FileFolderService fileFolderService
protected org.alfresco.service.cmr.repository.NodeService nodeService
protected TransactionService transactionService
protected org.alfresco.service.cmr.security.PermissionService permissionService
protected AuthenticationService authenticationService
protected PersonService personService
protected 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(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(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(AuthenticationService authenticationService)
authenticationService
- the authentication service to set (AuthenticationService
)public void setPersonService(PersonService personService)
personService
- the person service to set (PersonService
)public void setContentService(ContentService contentService)
contentService
- the content service to set (ContentService
)public DwsMetadata getDWSMetaData(String document, String id, boolean minimal) throws Exception
DwsServiceHandler
getDWSMetaData
in interface DwsServiceHandler
document
- the site-based URL of a document in a document library in the document workspace siteid
- 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
)Exception
DwsServiceHandler.getDWSMetaData(java.lang.String, java.lang.String, boolean)
public abstract WorkspaceType getWorkspaceType(FileInfo dwsNode)
public DwsData getDwsData(String document, String lastUpdate) throws SiteDoesNotExistException
DwsServiceHandler
getDwsData
in interface DwsServiceHandler
document
- the site-based URL of a document in a document library in the document workspace sitelastUpdate
- returned in the results of a previous call to the GetDwsData or GetDwsMetadata methodDwsData
)SiteDoesNotExistException
DwsServiceHandler.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)
DwsServiceHandler
createDws
in interface DwsServiceHandler
parentDwsUrl
- 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)
DwsServiceHandler
deleteDws
in interface DwsServiceHandler
dwsUrl
- url of dws to deleteuser
- current userDwsServiceHandler.deleteDws(java.lang.String, org.alfresco.repo.SessionUser)
public void createFolder(String url)
DwsServiceHandler
createFolder
in interface DwsServiceHandler
url
- the proposed site-based URL of the folder to createDwsServiceHandler.createFolder(java.lang.String)
public void deleteFolder(String url)
DwsServiceHandler
deleteFolder
in interface DwsServiceHandler
url
- The site-based URL of the folder to deleteDwsServiceHandler.deleteFolder(java.lang.String)
public void renameDws(String oldDwsUrl, String title)
DwsServiceHandler
renameDws
in interface DwsServiceHandler
oldDwsUrl
- 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)
DwsServiceHandler
removeDwsUser
in interface DwsServiceHandler
dwsUrl
- 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.HttpException
IOException
protected 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(FileInfo dwsFileInfo, SessionUser user) throws org.apache.commons.httpclient.HttpException, IOException
dwsFileInfo
- document workspace site file info (FileInfo
)user
- current userorg.apache.commons.httpclient.HttpException
IOException
protected abstract void doRemoveDwsUser(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(FileInfo dwsFileInfo)
dwsFileInfo
- document workspace site file info (FileInfo
)protected abstract void doGetDwsContentRecursive(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(FileInfo fileInfo)
protected abstract List<DocumentBean> doGetDwsDocuments(FileInfo fileInfo)
fileInfo
- document workspace site file info (FileInfo
)protected abstract org.alfresco.service.namespace.QName doGetModelType()
protected abstract List<Permission> doGetUsersPermissions(FileInfo dwsFileInfo)
dwsFileInfo
- document workspace site file info (FileInfo
)protected abstract SchemaBean doCreateDocumentSchemaBean(FileInfo dwsFileInfo, List<SchemaFieldBean> fields)
dwsFileInfo
- document workspace site file info (FileInfo
)fields
- system fields of the document (SchemaFieldBean
)protected abstract SchemaBean doCreateLinkSchemaBean(FileInfo dwsFileInfo, List<SchemaFieldBean> fields)
dwsFileInfo
- document workspace site file info (FileInfo
)fields
- system fields of the link (SchemaFieldBean
)protected abstract SchemaBean doCreateTasksSchemaBean(FileInfo dwsFileInfo, List<SchemaFieldBean> fields)
dwsFileInfo
- document workspace site file info (FileInfo
)fields
- system fields of the link (SchemaFieldBean
)protected abstract String doGetLastUpdate(FileInfo dwsFileInfo)
dwsFileInfo
- fileInfo of siteprotected UserBean getCurrentUser()
protected void addDwsContentRecursive(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)
DwsServiceHandler
updateDwsData
in interface DwsServiceHandler
linkBean
- (LinkBean
)method
- CAMLMethoddws
- document workspace site nameDwsServiceHandler.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–2017 Alfresco Software. All rights reserved.