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,
String webAppName,
String webAppDescription)
Create webapp for the given web project.
|
void |
createWebApp(String wpStoreId,
String webAppName,
String webAppDescription)
Create webapp for the given web project.
|
WebProjectInfo |
createWebProject(String dnsName,
String name,
String title,
String description)
Create a new web project (with a default ROOT webapp)
|
WebProjectInfo |
createWebProject(String dnsName,
String name,
String title,
String description,
org.alfresco.service.cmr.repository.NodeRef sourceNodeRef)
Create a new web project (with a default ROOT webapp)
|
WebProjectInfo |
createWebProject(String dnsName,
String name,
String title,
String description,
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,
String webAppName)
Delete webapp from the given web project
|
void |
deleteWebApp(String wpStoreId,
String webAppName)
Delete webapp from the given web project
|
void |
deleteWebProject(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
Delete the web project
|
void |
deleteWebProject(String wpStoreId)
Delete the web project
|
String |
getPreviewProvider(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(String wpStoreId)
Gets web project info based on the store id of a web project
|
org.alfresco.service.cmr.repository.NodeRef |
getWebProjectNodeFromPath(String absoluteAVMPath)
Returns the Web Project for the given AVM path
|
org.alfresco.service.cmr.repository.NodeRef |
getWebProjectNodeFromStore(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
|
String |
getWebUserRole(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
String userName)
Gets the role of the specified user
|
String |
getWebUserRole(String wpStoreId,
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,
String userAuth,
String role,
boolean autoCreateAuthorSandbox)
Invite user to web project
|
void |
inviteWebUser(String wpStoreId,
String userAuth,
String role)
Invite user to web project
|
void |
inviteWebUser(String wpStoreId,
String userAuth,
String role,
boolean autoCreateAuthorSandbox)
Invite user to web project
|
void |
inviteWebUsersGroups(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
Map<String,String> userGroupRoles,
boolean autoCreateAuthorSandbox)
Invite users/groups to web project
|
void |
inviteWebUsersGroups(String wpStoreId,
Map<String,String> userGroupRoles)
Invite users/groups to web project
|
void |
inviteWebUsersGroups(String wpStoreId,
Map<String,String> 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,
String userName)
Returns true if the user is a manager of this web project
|
boolean |
isContentManager(String storeName)
Returns true if the current user is a manager of this web project
|
boolean |
isContentManager(String wpStoreId,
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(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,
String userName)
Indicates whether given user is a web user of the web project or not
|
boolean |
isWebUser(String wpStoreId)
Indicates whether current user is a web user of the web project or not
|
boolean |
isWebUser(String wpStoreId,
String username)
Indicates whether given user is a web user of the web project or not
|
List<String> |
listWebApps(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
List webapps for the web project
|
List<String> |
listWebApps(String wpStoreId)
List webapps for the web project
|
List<WebProjectInfo> |
listWebProjects()
List the available web projects for the current user
|
List<WebProjectInfo> |
listWebProjects(String userName)
List the web projects for the given user (based on the available web projects for the current user)
|
Map<String,String> |
listWebUsers(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
List the web users of the web project
|
Map<String,String> |
listWebUsers(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(VirtServerRegistry virtServerRegistry) |
void |
uninviteWebUser(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
String userAuth,
boolean autoDeleteAuthorSandbox)
Uninvite user from a web project
|
void |
uninviteWebUser(String wpStoreId,
String userAuth)
Uninvite user from a web project
|
void |
uninviteWebUser(String wpStoreId,
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(VirtServerRegistry virtServerRegistry)
public void setPreviewURIServiceRegistry(PreviewURIServiceRegistry previewURIProviderRegistry)
public void setTransactionService(TransactionService transactionService)
public void setAvmLockingService(AVMLockingService avmLockingService)
public WebProjectInfo createWebProject(String dnsName, String name, String title, 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(String dnsName, String name, String title, 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(String dnsName, String name, String title, String description, 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(String wpStoreId, String webAppName, 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,
String webAppName,
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 List<String> listWebApps(String wpStoreId)
WebProjectServicelistWebApps in interface WebProjectServicewpStoreId - web project store idpublic List<String> listWebApps(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectServicelistWebApps in interface WebProjectServicewpNodeRef - web project node refpublic void deleteWebApp(String wpStoreId, 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,
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 List<WebProjectInfo> listWebProjects()
WebProjectServicelistWebProjects in interface WebProjectServicepublic List<WebProjectInfo> listWebProjects(String userName)
WebProjectServicelistWebProjects in interface WebProjectServiceuserName - user namepublic boolean isWebProject(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(String wpStoreId)
WebProjectServiceReturns null if the web project can not be found
getWebProject in interface WebProjectServicewpStoreId - web project store idpublic String getPreviewProvider(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(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(String storeName)
WebProjectServiceNote: This includes admin users but does not include the System user
isContentManager in interface WebProjectServicestoreName - web project store idpublic boolean isContentManager(String wpStoreId, 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,
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(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(String wpStoreId, String username)
WebProjectServiceisWebUser in interface WebProjectServiceusername - user namepublic boolean isWebUser(org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
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 Map<String,String> listWebUsers(String wpStoreId)
WebProjectServiceCurrent user must be a content manager for the web project
listWebUsers in interface WebProjectServicewpStoreId - web project store idpublic Map<String,String> 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 String getWebUserRole(String wpStoreId, String userName)
WebProjectServicegetWebUserRole in interface WebProjectServicewpStoreId - web project store iduserName - user namepublic String getWebUserRole(org.alfresco.service.cmr.repository.NodeRef wpNodeRef, String userName)
WebProjectServicegetWebUserRole in interface WebProjectServicewpNodeRef - web project node refuserName - user namepublic org.alfresco.service.cmr.repository.NodeRef getWebProjectNodeFromPath(String absoluteAVMPath)
WebProjectServicegetWebProjectNodeFromPath in interface WebProjectServiceabsoluteAVMPath - the AVM path from which to determine the Web Projectpublic org.alfresco.service.cmr.repository.NodeRef getWebProjectNodeFromStore(String wpStoreId)
WebProjectServicegetWebProjectNodeFromStore in interface WebProjectServicewpStoreId - the AVM store name (sandbox store id) from which to determine the Web Projectpublic void inviteWebUsersGroups(String wpStoreId, Map<String,String> 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(String wpStoreId, Map<String,String> 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,
Map<String,String> 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(String wpStoreId, String userAuth, 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(String wpStoreId, String userAuth, 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,
String userAuth,
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(String wpStoreId, String userAuth)
WebProjectServiceNote: author sandbox will NOT be auto deleted
uninviteWebUser in interface WebProjectServicewpStoreId - web project store iduserAuth - user namepublic void uninviteWebUser(String wpStoreId, 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,
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–2014 Alfresco Software. All rights reserved.