public class AlfrescoDwsServiceHandler extends AbstractAlfrescoDwsServiceHandler
authenticationService, contentService, fileFolderService, nodeService, pagesMap, pathHelper, permissionService, personService, transactionService
Constructor and Description |
---|
AlfrescoDwsServiceHandler() |
Modifier and Type | Method and Description |
---|---|
boolean |
canCreateDwsUrl(String url)
Indicates whether the document workspace specified by the given url can be created.
|
protected SchemaBean |
doCreateDocumentSchemaBean(FileInfo dwsFileInfo,
List<SchemaFieldBean> fields)
Create document schema
|
protected String |
doCreateDws(String dwsName,
String title,
SessionUser user)
Creates a document workspace site
|
protected SchemaBean |
doCreateLinkSchemaBean(FileInfo dwsFileInfo,
List<SchemaFieldBean> fields)
Create link schema
|
protected SchemaBean |
doCreateTasksSchemaBean(FileInfo dwsFileInfo,
List<SchemaFieldBean> fields)
Create tasks schema
|
protected void |
doDeleteDws(FileInfo dwsFileInfo,
SessionUser user)
Deletes the current document workspace site and its contents
|
void |
doGetDwsContentRecursive(FileInfo fileInfo,
List<DocumentBean> dwsContent)
Get document workspace site content
|
protected String |
doGetDwsCreationUrl(String parentUrl,
String title)
Get a new document workspace site creation url
|
protected List<DocumentBean> |
doGetDwsDocuments(FileInfo fileInfo)
Get the document list
|
List<LinkBean> |
doGetDwsLinks(FileInfo fileInfo)
Get document workspace site links
|
protected String |
doGetLastUpdate(FileInfo dwsFileInfo)
Resolves site's last update time as string
|
protected org.alfresco.service.namespace.QName |
doGetModelType()
Get type of alfresco document workspace site (Folder or Site)
|
protected DwsBean |
doGetResultBean(String parentUrl,
String dwsUrl,
String host,
String context)
Get new document workspace site description
|
protected List<Permission> |
doGetUsersPermissions(FileInfo dwsFileInfo)
Get users permissions
|
List<MemberBean> |
doListDwsMembers(FileInfo dwsFileInfo)
Get document workspace site users
|
void |
doRemoveDwsUser(FileInfo dwsFileInfo,
String authority)
Removes the specified user from the list of users for the current document workspace site
|
protected void |
doUpdateDwsDataDelete(LinkBean linkBean,
String dws)
Deletes link in site links container
|
protected LinkBean |
doUpdateDwsDataNew(LinkBean linkBean,
String dws)
Creates new link in site links container
|
protected void |
doUpdateDwsDataUpdate(LinkBean linkBean,
String dws)
Updates given link in site links container
|
protected boolean |
dwsExists(String name) |
WorkspaceType |
getWorkspaceType(FileInfo dwsNode) |
void |
handleRedirect(HttpServletRequest req,
HttpServletResponse resp)
Redirect request to the appropriate page
|
protected String |
sanitizeShortName(String dwsName)
For a given Document Workspace name, sanitizes it such that:
the name is all lower case
it does not contain spaces - they are replaced with hyphens
|
void |
setAuthenticationComponent(AuthenticationComponent authenticationComponent)
Set authentication component
|
void |
setAuthorityService(AuthorityService authorityService)
Set authority service
|
void |
setShareUtils(ShareUtils shareUtils)
Set share utils
|
void |
setSiteService(SiteService siteService)
Set site service
|
addDwsContentRecursive, createDws, createFolder, deleteDws, deleteFolder, getCurrentUser, getDwsData, getDWSMetaData, getDwsPermissionsUrl, getPagesMap, removeDwsUser, removeIllegalCharacters, renameDws, setAuthenticationService, setContentService, setFileFolderService, setNodeService, setPagesMap, setPathHelper, setPermissionService, setPersonService, setTransactionService, updateDwsData
public void setAuthorityService(AuthorityService authorityService)
authorityService
- the authority service to set (AuthorityService
)public void setAuthenticationComponent(AuthenticationComponent authenticationComponent)
authenticationComponent
- the authentication component to set (AuthenticationComponent
)public void setSiteService(SiteService siteService)
siteService
- the site service to set (SiteService
)public void setShareUtils(ShareUtils shareUtils)
shareUtils
- the share utils to set (ShareUtils
)public void handleRedirect(HttpServletRequest req, HttpServletResponse resp) throws org.apache.commons.httpclient.HttpException, IOException
DwsServiceHandler
req
- HTTP requestresp
- HTTP responseorg.apache.commons.httpclient.HttpException
IOException
DwsServiceHandler.handleRedirect(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
public boolean canCreateDwsUrl(String url)
url
- Specifies the document workspace to be created.public void doRemoveDwsUser(FileInfo dwsFileInfo, String authority)
AbstractAlfrescoDwsServiceHandler
doRemoveDwsUser
in class AbstractAlfrescoDwsServiceHandler
dwsFileInfo
- document workspace site file info (FileInfo
)authority
- name of the user to be removed from the list of usersAbstractAlfrescoDwsServiceHandler.doRemoveDwsUser(org.alfresco.service.cmr.model.FileInfo, java.lang.String)
public void doGetDwsContentRecursive(FileInfo fileInfo, List<DocumentBean> dwsContent)
AbstractAlfrescoDwsServiceHandler
doGetDwsContentRecursive
in class AbstractAlfrescoDwsServiceHandler
fileInfo
- document workspace site file info (FileInfo
)dwsContent
- list of beans with document workspace site content informations (DocumentBean
)AbstractAlfrescoDwsServiceHandler.doGetDwsContentRecursive(org.alfresco.service.cmr.model.FileInfo, java.util.List)
public List<LinkBean> doGetDwsLinks(FileInfo fileInfo)
AbstractAlfrescoDwsServiceHandler
doGetDwsLinks
in class AbstractAlfrescoDwsServiceHandler
fileInfo
- document workspace site file info (FileInfo
)LinkBean
)AbstractAlfrescoDwsServiceHandler.doGetDwsLinks(org.alfresco.service.cmr.model.FileInfo)
protected List<DocumentBean> doGetDwsDocuments(FileInfo fileInfo)
AbstractAlfrescoDwsServiceHandler
doGetDwsDocuments
in class AbstractAlfrescoDwsServiceHandler
fileInfo
- document workspace site file info (FileInfo
)AbstractAlfrescoDwsServiceHandler.doGetDwsDocuments(FileInfo)
public List<MemberBean> doListDwsMembers(FileInfo dwsFileInfo)
AbstractAlfrescoDwsServiceHandler
doListDwsMembers
in class AbstractAlfrescoDwsServiceHandler
dwsFileInfo
- document workspace site file info (FileInfo
)AbstractAlfrescoDwsServiceHandler.doListDwsMembers(org.alfresco.service.cmr.model.FileInfo)
protected org.alfresco.service.namespace.QName doGetModelType()
AbstractAlfrescoDwsServiceHandler
doGetModelType
in class AbstractAlfrescoDwsServiceHandler
AbstractAlfrescoDwsServiceHandler.doGetModelType()
protected List<Permission> doGetUsersPermissions(FileInfo dwsFileInfo)
AbstractAlfrescoDwsServiceHandler
doGetUsersPermissions
in class AbstractAlfrescoDwsServiceHandler
dwsFileInfo
- document workspace site file info (FileInfo
)AbstractAlfrescoDwsServiceHandler.doGetUsersPermissions(org.alfresco.service.cmr.model.FileInfo)
protected SchemaBean doCreateDocumentSchemaBean(FileInfo dwsFileInfo, List<SchemaFieldBean> fields)
AbstractAlfrescoDwsServiceHandler
doCreateDocumentSchemaBean
in class AbstractAlfrescoDwsServiceHandler
dwsFileInfo
- document workspace site file info (FileInfo
)fields
- system fields of the document (SchemaFieldBean
)AbstractAlfrescoDwsServiceHandler.doCreateDocumentSchemaBean(org.alfresco.service.cmr.model.FileInfo, java.util.List)
protected SchemaBean doCreateLinkSchemaBean(FileInfo dwsFileInfo, List<SchemaFieldBean> fields)
AbstractAlfrescoDwsServiceHandler
doCreateLinkSchemaBean
in class AbstractAlfrescoDwsServiceHandler
dwsFileInfo
- document workspace site file info (FileInfo
)fields
- system fields of the link (SchemaFieldBean
)AbstractAlfrescoDwsServiceHandler.doCreateLinkSchemaBean(org.alfresco.service.cmr.model.FileInfo, java.util.List)
protected SchemaBean doCreateTasksSchemaBean(FileInfo dwsFileInfo, List<SchemaFieldBean> fields)
AbstractAlfrescoDwsServiceHandler
doCreateTasksSchemaBean
in class AbstractAlfrescoDwsServiceHandler
dwsFileInfo
- document workspace site file info (FileInfo
)fields
- system fields of the link (SchemaFieldBean
)AbstractAlfrescoDwsServiceHandler.doCreateTasksSchemaBean(org.alfresco.service.cmr.model.FileInfo, java.util.List)
protected void doDeleteDws(FileInfo dwsFileInfo, SessionUser user) throws org.apache.commons.httpclient.HttpException, IOException
AbstractAlfrescoDwsServiceHandler
doDeleteDws
in class AbstractAlfrescoDwsServiceHandler
dwsFileInfo
- document workspace site file info (FileInfo
)user
- current userorg.apache.commons.httpclient.HttpException
IOException
AbstractAlfrescoDwsServiceHandler.doDeleteDws(org.alfresco.service.cmr.model.FileInfo, org.alfresco.repo.SessionUser)
protected String doCreateDws(String dwsName, String title, SessionUser user) throws org.apache.commons.httpclient.HttpException, IOException
doCreateDws
in class AbstractAlfrescoDwsServiceHandler
dwsName
- TODOtitle
- the title of the new document workspace siteuser
- current userorg.apache.commons.httpclient.HttpException
IOException
protected String sanitizeShortName(String dwsName)
dwsName
- protected boolean dwsExists(String name)
dwsExists
in class AbstractAlfrescoDwsServiceHandler
true
if the specified DWS exists.protected String doGetDwsCreationUrl(String parentUrl, String title)
AbstractAlfrescoDwsServiceHandler
doGetDwsCreationUrl
in class AbstractAlfrescoDwsServiceHandler
parentUrl
- url of the parent dwstitle
- the title of the new document workspace siteAbstractAlfrescoDwsServiceHandler.doGetDwsCreationUrl(java.lang.String, java.lang.String)
protected DwsBean doGetResultBean(String parentUrl, String dwsUrl, String host, String context)
AbstractAlfrescoDwsServiceHandler
doGetResultBean
in class AbstractAlfrescoDwsServiceHandler
parentUrl
- url of the parent document workspace sitedwsUrl
- url of the document workspace sitehost
- application hostcontext
- application contextAbstractAlfrescoDwsServiceHandler.doGetResultBean(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
protected void doUpdateDwsDataDelete(LinkBean linkBean, String dws)
AbstractAlfrescoDwsServiceHandler
doUpdateDwsDataDelete
in class AbstractAlfrescoDwsServiceHandler
linkBean
- linkBean that should be deleteddws
- site nameAbstractAlfrescoDwsServiceHandler.doUpdateDwsDataDelete(org.alfresco.module.vti.metadata.model.LinkBean, java.lang.String)
protected LinkBean doUpdateDwsDataNew(LinkBean linkBean, String dws)
AbstractAlfrescoDwsServiceHandler
doUpdateDwsDataNew
in class AbstractAlfrescoDwsServiceHandler
linkBean
- linkBean that should be createddws
- site nameAbstractAlfrescoDwsServiceHandler.doUpdateDwsDataNew(org.alfresco.module.vti.metadata.model.LinkBean, java.lang.String)
protected void doUpdateDwsDataUpdate(LinkBean linkBean, String dws)
AbstractAlfrescoDwsServiceHandler
doUpdateDwsDataUpdate
in class AbstractAlfrescoDwsServiceHandler
linkBean
- linkBean that should be updateddws
- site nameAbstractAlfrescoDwsServiceHandler.doUpdateDwsDataUpdate(org.alfresco.module.vti.metadata.model.LinkBean, java.lang.String)
public WorkspaceType getWorkspaceType(FileInfo dwsNode)
getWorkspaceType
in class AbstractAlfrescoDwsServiceHandler
protected String doGetLastUpdate(FileInfo dwsFileInfo)
AbstractAlfrescoDwsServiceHandler
doGetLastUpdate
in class AbstractAlfrescoDwsServiceHandler
dwsFileInfo
- fileInfo of siteAbstractAlfrescoDwsServiceHandler.doGetLastUpdate(org.alfresco.service.cmr.model.FileInfo dwsFileInfo)
Copyright © 2005–2017 Alfresco Software. All rights reserved.