public class WebProjectServiceImpl extends WCMUtil implements WebProjectService
| Modifier and Type | Field and Description |
|---|---|
static org.alfresco.service.cmr.repository.StoreRef |
WEBPROJECT_STORE
The DM store where web projects are kept
|
DIR_ROOT, LOCK_KEY_STORE_NAME, PATTERN_ILLEGAL_SEQUENCE, ROLE_CONTENT_CONTRIBUTOR, ROLE_CONTENT_MANAGER, ROLE_CONTENT_PUBLISHER, ROLE_CONTENT_REVIEWER, SPACE_ICON_WEBSITE, STORE_PREVIEW, STORE_SEPARATOR, STORE_WORKFLOW, WORKFLOW_SUBMITDIRECT_NAMEAVM_PATH_SEPARATOR, AVM_PATH_SEPARATOR_CHAR, AVM_STORE_SEPARATOR, AVM_STORE_SEPARATOR_CHAR, INITIAL_SNAPSHOT| Constructor and Description |
|---|
WebProjectServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
createWebApp(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.lang.String webAppName,
java.lang.String webAppDescription)
Create webapp for the given web project.
|
void |
createWebApp(java.lang.String wpStoreId,
java.lang.String webAppName,
java.lang.String webAppDescription)
Create webapp for the given web project.
|
WebProjectInfo |
createWebProject(java.lang.String dnsName,
java.lang.String name,
java.lang.String title,
java.lang.String description)
Create a new web project (with a default ROOT webapp)
|
WebProjectInfo |
createWebProject(java.lang.String dnsName,
java.lang.String name,
java.lang.String title,
java.lang.String description,
org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)
Create a new web project (with a default ROOT webapp)
|
WebProjectInfo |
createWebProject(java.lang.String dnsName,
java.lang.String name,
java.lang.String title,
java.lang.String description,
java.lang.String defaultWebApp,
boolean useAsTemplate,
org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)
Create a new web project (with given default web app)
|
WebProjectInfo |
createWebProject(WebProjectInfo wpInfo)
Create a new web project (with given web project info)
|
void |
deleteWebApp(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.lang.String webAppName)
Delete webapp from the given web project
|
void |
deleteWebApp(java.lang.String wpStoreId,
java.lang.String webAppName)
Delete webapp from the given web project
|
void |
deleteWebProject(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
Delete the web project
|
void |
deleteWebProject(java.lang.String wpStoreId)
Delete the web project
|
java.lang.String |
getPreviewProvider(java.lang.String wpStoreId)
Get preview provider name configured for given web project (if not configured then return default preview provider)
|
WebProjectInfo |
getWebProject(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
Gets web project info based on the DM nodeRef of a web project
|
WebProjectInfo |
getWebProject(java.lang.String wpStoreId)
Gets web project info based on the store id of a web project
|
org.alfresco.service.cmr.repository.NodeRef |
getWebProjectNodeFromPath(java.lang.String absoluteAVMPath)
Returns the Web Project for the given AVM path
|
org.alfresco.service.cmr.repository.NodeRef |
getWebProjectNodeFromStore(java.lang.String wpStoreId)
Returns the Web Project for the given AVM store name (sandbox store id)
|
org.alfresco.service.cmr.repository.NodeRef |
getWebProjectsRoot()
Get the node reference that is the web projects root
|
int |
getWebUserCount(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
Get the number of web users invited to this web project
|
java.lang.String |
getWebUserRole(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.lang.String userName)
Gets the role of the specified user
|
java.lang.String |
getWebUserRole(java.lang.String wpStoreId,
java.lang.String userName)
Gets the role of the specified user
|
boolean |
hasWebProjectsRoot()
Determines whether the "Web Projects" container node is present.
|
void |
inviteWebUser(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.lang.String userAuth,
java.lang.String role,
boolean autoCreateAuthorSandbox)
Invite user to web project
|
void |
inviteWebUser(java.lang.String wpStoreId,
java.lang.String userAuth,
java.lang.String role)
Invite user to web project
|
void |
inviteWebUser(java.lang.String wpStoreId,
java.lang.String userAuth,
java.lang.String role,
boolean autoCreateAuthorSandbox)
Invite user to web project
|
void |
inviteWebUsersGroups(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.util.Map userGroupRoles,
boolean autoCreateAuthorSandbox)
Invite users/groups to web project
|
void |
inviteWebUsersGroups(java.lang.String wpStoreId,
java.util.Map userGroupRoles)
Invite users/groups to web project
|
void |
inviteWebUsersGroups(java.lang.String wpStoreId,
java.util.Map userGroupRoles,
boolean autoCreateAuthorSandbox)
Invite users/groups to web project
|
boolean |
isContentManager(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
Returns true if the current user is a manager of this web project
|
boolean |
isContentManager(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.lang.String userName)
Returns true if the user is a manager of this web project
|
boolean |
isContentManager(java.lang.String storeName)
Returns true if the current user is a manager of this web project
|
boolean |
isContentManager(java.lang.String wpStoreId,
java.lang.String userName)
Returns true if the user is a manager of this web project
|
boolean |
isWebProject(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
Return true if web project node ref is a web project
|
boolean |
isWebProject(java.lang.String wpStoreId)
Return true if web project node ref is a web project
|
boolean |
isWebUser(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
Indicates whether current user is a web user of the web project or not
|
boolean |
isWebUser(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.lang.String userName)
Indicates whether given user is a web user of the web project or not
|
boolean |
isWebUser(java.lang.String wpStoreId)
Indicates whether current user is a web user of the web project or not
|
boolean |
isWebUser(java.lang.String wpStoreId,
java.lang.String username)
Indicates whether given user is a web user of the web project or not
|
java.util.List |
listWebApps(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
List webapps for the web project
|
java.util.List |
listWebApps(java.lang.String wpStoreId)
List webapps for the web project
|
java.util.List |
listWebProjects()
List the available web projects for the current user
|
java.util.List |
listWebProjects(java.lang.String userName)
List the web projects for the given user (based on the available web projects for the current user)
|
java.util.Map |
listWebUsers(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
List the web users of the web project
|
java.util.Map |
listWebUsers(java.lang.String wpStoreId)
List the web users of the web project
|
void |
setAuthorityService(AuthorityService authorityService) |
void |
setAvmLockingService(AVMLockingService avmLockingService) |
void |
setAvmService(AVMService avmService) |
void |
setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService) |
void |
setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService) |
void |
setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService) |
void |
setPersonService(PersonService personService) |
void |
setPreviewURIServiceRegistry(PreviewURIServiceRegistry previewURIProviderRegistry) |
void |
setSandboxFactory(SandboxFactory sandboxFactory) |
void |
setSearchService(org.alfresco.service.cmr.search.SearchService searchService) |
void |
setTransactionService(TransactionService transactionService) |
void |
setVirtServerRegistry(org.alfresco.mbeans.VirtServerRegistry virtServerRegistry) |
void |
uninviteWebUser(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.lang.String userAuth,
boolean autoDeleteAuthorSandbox)
Uninvite user from a web project
|
void |
uninviteWebUser(java.lang.String wpStoreId,
java.lang.String userAuth)
Uninvite user from a web project
|
void |
uninviteWebUser(java.lang.String wpStoreId,
java.lang.String userAuth,
boolean autoDeleteAuthorSandbox)
Uninvite user from a web project
|
void |
updateWebProject(WebProjectInfo wpInfo)
Update the web project info
|
buildSandboxRootPath, buildStagingPreviewStoreName, buildStagingStoreName, buildStoreRootPath, buildStoreWebappPath, buildUserMainStoreName, buildUserPreviewStoreName, buildWorkflowMainStoreName, buildWorkflowPreviewStoreName, escapeStoreNameComponent, getCommonWebApp, getCorrespondingMainStoreName, getCorrespondingPath, getCorrespondingPathInMainStore, getCorrespondingPathInPreviewStore, getCorrespondingPreviewStoreName, getSandboxPath, getSandboxRelativePath, getSandboxStoreId, getStoreRelativePath, getUserName, getWebapp, getWebappPath, getWebappRelativePath, getWebProject, getWebProjectNodeFromWebProjectStore, getWebProjectStoreId, getWebProjectStoreIdFromPath, getWorkflowId, isLocalhostDeployedStore, isPreviewStore, isStagingStore, isUserStore, isWorkflowStore, listWebUserRefs, listWebUsers, lookupStoreDNS, removeAllVServerWebapps, removeVServerWebapp, updateVServerWebappaddLeadingSlash, buildAVMPath, extendAVMPath, getStoreName, normalizePath, splitBase, splitPathpublic static final org.alfresco.service.cmr.repository.StoreRef WEBPROJECT_STORE
public void setNodeService(org.alfresco.service.cmr.repository.NodeService nodeService)
public void setNamespaceService(org.alfresco.service.namespace.NamespaceService namespaceService)
public void setSearchService(org.alfresco.service.cmr.search.SearchService searchService)
public void setAvmService(AVMService avmService)
public void setAuthorityService(AuthorityService authorityService)
public void setPermissionService(org.alfresco.service.cmr.security.PermissionService permissionService)
public void setPersonService(PersonService personService)
public void setSandboxFactory(SandboxFactory sandboxFactory)
public void setVirtServerRegistry(org.alfresco.mbeans.VirtServerRegistry virtServerRegistry)
public void setPreviewURIServiceRegistry(PreviewURIServiceRegistry previewURIProviderRegistry)
public void setTransactionService(TransactionService transactionService)
public void setAvmLockingService(AVMLockingService avmLockingService)
public WebProjectInfo createWebProject(java.lang.String dnsName, java.lang.String name, java.lang.String title, java.lang.String description)
WebProjectServiceNote: the DNS name will be used to generate the web project store id, which can be subsequently retrieved via WebProjectInfo.getStoreId()
createWebProject in interface WebProjectServicednsName - DNS name (required, must be unique)name - name (required, must be unique)title - titledescription - descriptionpublic WebProjectInfo createWebProject(java.lang.String dnsName, java.lang.String name, java.lang.String title, java.lang.String description, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)
WebProjectServiceNote: the DNS name will be used to generate the web project store id, which can be subsequently retrieved via WebProjectInfo.getStoreId()
createWebProject in interface WebProjectServicednsName - DNS name (required, must be unique)name - name (required, must be unique)title - titledescription - descriptionsourceNodeRef - web project node ref to branch from (can be null)public WebProjectInfo createWebProject(java.lang.String dnsName, java.lang.String name, java.lang.String title, java.lang.String description, java.lang.String defaultWebApp, boolean useAsTemplate, org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)
WebProjectServiceNote: the DNS name will be used to generate the web project store id, which can be subsequently retrieved via WebProjectInfo.getStoreId()
createWebProject in interface WebProjectServicednsName - DNS name (required, must be unique)name - name (required, must be unique)title - titledescription - descriptiondefaultWebApp - default webapp (if null, will default to ROOT webapp)useAsTemplate - true if this web project can be used as a template to branch fromsourceNodeRef - web project node ref to branch from (can be null)public WebProjectInfo createWebProject(WebProjectInfo wpInfo)
WebProjectServiceNote: the DNS name will be used to generate the web project store id, which can be subsequently retrieved via WebProjectInfo.getStoreId()
createWebProject in interface WebProjectServicewpInfo - web project info
Note:public void createWebApp(java.lang.String wpStoreId,
java.lang.String webAppName,
java.lang.String webAppDescription)
WebProjectServiceCurrent user must be a content manager for the web project
createWebApp in interface WebProjectServicewpStoreId - web project store idwebAppName - webapp name (must be unique within a web project)webAppDescription - webapp descriptionpublic void createWebApp(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.lang.String webAppName,
java.lang.String webAppDescription)
WebProjectServiceCurrent user must be a content manager for the web project
createWebApp in interface WebProjectServicewpNodeRef - web project node refwebAppName - webapp name (must be unique within a web project)webAppDescription - webapp descriptionpublic java.util.List listWebApps(java.lang.String wpStoreId)
WebProjectServicelistWebApps in interface WebProjectServicewpStoreId - web project store idpublic java.util.List listWebApps(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectServicelistWebApps in interface WebProjectServicewpNodeRef - web project node refpublic void deleteWebApp(java.lang.String wpStoreId,
java.lang.String webAppName)
WebProjectServiceCurrent user must be a content manager for the web project
Note: this will cascade delete all assets within a webapp
deleteWebApp in interface WebProjectServicewpStoreId - web project store idwebAppName - webapp namepublic void deleteWebApp(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.lang.String webAppName)
WebProjectServiceCurrent user must be a content manager for the web project
Note: this will cascade delete all assets within a webapp
deleteWebApp in interface WebProjectServicewpNodeRef - web project node refwebAppName - webapp namepublic boolean hasWebProjectsRoot()
WebProjectServicehasWebProjectsRoot in interface WebProjectServicepublic org.alfresco.service.cmr.repository.NodeRef getWebProjectsRoot()
getWebProjectsRoot in interface WebProjectServicepublic java.util.List listWebProjects()
WebProjectServicelistWebProjects in interface WebProjectServicepublic java.util.List listWebProjects(java.lang.String userName)
WebProjectServicelistWebProjects in interface WebProjectServiceuserName - user namepublic boolean isWebProject(java.lang.String wpStoreId)
WebProjectServiceisWebProject in interface WebProjectServicepublic boolean isWebProject(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectServiceisWebProject in interface WebProjectServicewpNodeRef - web project node refpublic WebProjectInfo getWebProject(java.lang.String wpStoreId)
WebProjectServiceReturns null if the web project can not be found
getWebProject in interface WebProjectServicewpStoreId - web project store idpublic java.lang.String getPreviewProvider(java.lang.String wpStoreId)
WebProjectServicegetPreviewProvider in interface WebProjectServicewpStoreId - web project store idpublic WebProjectInfo getWebProject(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectServiceReturns null if the web project can not be found
getWebProject in interface WebProjectServicewpNodeRef - web project node refpublic void updateWebProject(WebProjectInfo wpInfo)
WebProjectServiceNote: the nodeRef and storeId (dnsName) of a web project cannot be updated once the web project has been created
updateWebProject in interface WebProjectServicewpInfo - web project infopublic void deleteWebProject(java.lang.String wpStoreId)
WebProjectServiceIf the web project does not exist, will log a warning and succeed
Current user must be a content manager for the web project
deleteWebProject in interface WebProjectServicepublic void deleteWebProject(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectServiceIf the web project does not exist, will log a warning and succeed
Current user must be a content manager for the web project
Note: this will cascade delete all sandboxes associated with a web project
deleteWebProject in interface WebProjectServicepublic boolean isContentManager(java.lang.String storeName)
WebProjectServiceNote: This includes admin users but does not include the System user
isContentManager in interface WebProjectServicestoreName - web project store idpublic boolean isContentManager(java.lang.String wpStoreId,
java.lang.String userName)
WebProjectServiceNote: This includes admin users but does not include the System user
isContentManager in interface WebProjectServiceuserName - user namepublic boolean isContentManager(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectServiceisContentManager in interface WebProjectServicewpNodeRef - web project node refpublic boolean isContentManager(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.lang.String userName)
WebProjectServiceNote: This includes admin users but does not include the System user
isContentManager in interface WebProjectServicewpNodeRef - web project node refuserName - user namepublic boolean isWebUser(java.lang.String wpStoreId)
WebProjectServiceisWebUser in interface WebProjectServicepublic boolean isWebUser(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectServiceisWebUser in interface WebProjectServicewpNodeRef - web project node refpublic boolean isWebUser(java.lang.String wpStoreId,
java.lang.String username)
WebProjectServiceisWebUser in interface WebProjectServiceusername - user namepublic boolean isWebUser(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.lang.String userName)
WebProjectServiceisWebUser in interface WebProjectServicewpNodeRef - web project node refuserName - user namepublic int getWebUserCount(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectServicegetWebUserCount in interface WebProjectServicewpNodeRef - web project node refpublic java.util.Map listWebUsers(java.lang.String wpStoreId)
WebProjectServiceCurrent user must be a content manager for the web project
listWebUsers in interface WebProjectServicewpStoreId - web project store idpublic java.util.Map listWebUsers(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectServiceCurrent user must be a content manager for the web project
listWebUsers in interface WebProjectServicewpNodeRef - web project node refpublic java.lang.String getWebUserRole(java.lang.String wpStoreId,
java.lang.String userName)
WebProjectServicegetWebUserRole in interface WebProjectServicewpStoreId - web project store iduserName - user namepublic java.lang.String getWebUserRole(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.lang.String userName)
WebProjectServicegetWebUserRole in interface WebProjectServicewpNodeRef - web project node refuserName - user namepublic org.alfresco.service.cmr.repository.NodeRef getWebProjectNodeFromPath(java.lang.String absoluteAVMPath)
WebProjectServicegetWebProjectNodeFromPath in interface WebProjectServiceabsoluteAVMPath - the AVM path from which to determine the Web Projectpublic org.alfresco.service.cmr.repository.NodeRef getWebProjectNodeFromStore(java.lang.String wpStoreId)
WebProjectServicegetWebProjectNodeFromStore in interface WebProjectServicewpStoreId - the AVM store name (sandbox store id) from which to determine the Web Projectpublic void inviteWebUsersGroups(java.lang.String wpStoreId,
java.util.Map userGroupRoles)
WebProjectServiceNote: authority name can be user or group, although a group is flattened into a set of users
Note: author sandbox will NOT be auto created for each invited user
inviteWebUsersGroups in interface WebProjectServicewpStoreId - web project store iduserGroupRoles - map of public void inviteWebUsersGroups(java.lang.String wpStoreId,
java.util.Map userGroupRoles,
boolean autoCreateAuthorSandbox)
WebProjectServiceNote: authority name can be user or group, although a group is flattened into a set of users
inviteWebUsersGroups in interface WebProjectServicewpStoreId - web project store iduserGroupRoles - map of autoCreateAuthorSandbox - if true then auto create an author sandbox for each invited userpublic void inviteWebUsersGroups(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.util.Map userGroupRoles,
boolean autoCreateAuthorSandbox)
WebProjectServiceNote: authority name can be user or group, although a group is flattened into a set of users
inviteWebUsersGroups in interface WebProjectServicewpNodeRef - web project node refuserGroupRoles - map of autoCreateAuthorSandbox - if true then auto create the author sandbox for each invited userpublic void inviteWebUser(java.lang.String wpStoreId,
java.lang.String userAuth,
java.lang.String role)
WebProjectServiceNote: author sandbox will NOT be auto created for each invited user
inviteWebUser in interface WebProjectServicewpStoreId - web project store iduserAuth - user name (not a group)role - web project rolepublic void inviteWebUser(java.lang.String wpStoreId,
java.lang.String userAuth,
java.lang.String role,
boolean autoCreateAuthorSandbox)
WebProjectServiceinviteWebUser in interface WebProjectServicewpStoreId - web project store iduserAuth - user name (not a group)role - web project roleautoCreateAuthorSandbox - if true then auto create the author sandbox for each invited userpublic void inviteWebUser(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.lang.String userAuth,
java.lang.String role,
boolean autoCreateAuthorSandbox)
WebProjectServiceinviteWebUser in interface WebProjectServicewpNodeRef - web project node refuserAuth - user name (not a group)role - web project roleautoCreateAuthorSandbox - if true then auto create the author sandbox for each invited userpublic void uninviteWebUser(java.lang.String wpStoreId,
java.lang.String userAuth)
WebProjectServiceNote: author sandbox will NOT be auto deleted
uninviteWebUser in interface WebProjectServicewpStoreId - web project store iduserAuth - user namepublic void uninviteWebUser(java.lang.String wpStoreId,
java.lang.String userAuth,
boolean autoDeleteAuthorSandbox)
WebProjectServiceNote: if author sandbox is auto deleted then this will cascade delete without warning (even if there are changed items)
uninviteWebUser in interface WebProjectServicewpStoreId - web project store iduserAuth - user nameautoDeleteAuthorSandbox - if true then auto delete the author sandboxpublic void uninviteWebUser(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
java.lang.String userAuth,
boolean autoDeleteAuthorSandbox)
WebProjectServiceNote: if author sandbox is auto deleted then this will cascade delete without warning (even if there are changed items)
uninviteWebUser in interface WebProjectServicewpNodeRef - web project node refuserAuth - user nameautoDeleteAuthorSandbox - if true then auto delete the author sandboxCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.