|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.alfresco.repo.avm.util.AVMUtil
org.alfresco.wcm.util.WCMUtil
org.alfresco.wcm.webproject.WebProjectServiceImpl
public class WebProjectServiceImpl
Web Project Service Implementation
Field Summary | |
---|---|
static org.alfresco.service.cmr.repository.StoreRef |
WEBPROJECT_STORE
The DM store where web projects are kept |
Fields inherited from class org.alfresco.wcm.util.WCMUtil |
---|
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_NAME |
Fields inherited from class org.alfresco.repo.avm.util.AVMUtil |
---|
AVM_PATH_SEPARATOR, AVM_PATH_SEPARATOR_CHAR, AVM_STORE_SEPARATOR, AVM_STORE_SEPARATOR_CHAR, INITIAL_SNAPSHOT |
Constructor Summary | |
---|---|
WebProjectServiceImpl()
|
Method Summary | |
---|---|
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 |
Methods inherited from class org.alfresco.repo.avm.util.AVMUtil |
---|
addLeadingSlash, buildAVMPath, extendAVMPath, getStoreName, normalizePath, splitBase, splitPath |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final org.alfresco.service.cmr.repository.StoreRef WEBPROJECT_STORE
Constructor Detail |
---|
public WebProjectServiceImpl()
Method Detail |
---|
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)
WebProjectService
Note: the DNS name will be used to generate the web project store id, which can be subsequently retrieved via WebProjectInfo.getStoreId()
createWebProject
in interface WebProjectService
dnsName
- DNS name (required, must be unique)name
- name (required, must be unique)title
- titledescription
- description
public 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)
WebProjectService
Note: the DNS name will be used to generate the web project store id, which can be subsequently retrieved via WebProjectInfo.getStoreId()
createWebProject
in interface WebProjectService
dnsName
- 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)
WebProjectService
Note: the DNS name will be used to generate the web project store id, which can be subsequently retrieved via WebProjectInfo.getStoreId()
createWebProject
in interface WebProjectService
dnsName
- 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)
WebProjectService
Note: the DNS name will be used to generate the web project store id, which can be subsequently retrieved via WebProjectInfo.getStoreId()
createWebProject
in interface WebProjectService
wpInfo
- web project info
Note:
public void createWebApp(java.lang.String wpStoreId, java.lang.String webAppName, java.lang.String webAppDescription)
WebProjectService
Current user must be a content manager for the web project
createWebApp
in interface WebProjectService
wpStoreId
- 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)
WebProjectService
Current user must be a content manager for the web project
createWebApp
in interface WebProjectService
wpNodeRef
- web project node refwebAppName
- webapp name (must be unique within a web project)webAppDescription
- webapp descriptionpublic java.util.List listWebApps(java.lang.String wpStoreId)
WebProjectService
listWebApps
in interface WebProjectService
wpStoreId
- web project store id
public java.util.List listWebApps(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectService
listWebApps
in interface WebProjectService
wpNodeRef
- web project node ref
public void deleteWebApp(java.lang.String wpStoreId, java.lang.String webAppName)
WebProjectService
Current user must be a content manager for the web project
Note: this will cascade delete all assets within a webapp
deleteWebApp
in interface WebProjectService
wpStoreId
- web project store idwebAppName
- webapp namepublic void deleteWebApp(org.alfresco.service.cmr.repository.NodeRef wpNodeRef, java.lang.String webAppName)
WebProjectService
Current user must be a content manager for the web project
Note: this will cascade delete all assets within a webapp
deleteWebApp
in interface WebProjectService
wpNodeRef
- web project node refwebAppName
- webapp namepublic boolean hasWebProjectsRoot()
WebProjectService
hasWebProjectsRoot
in interface WebProjectService
public org.alfresco.service.cmr.repository.NodeRef getWebProjectsRoot()
getWebProjectsRoot
in interface WebProjectService
public java.util.List listWebProjects()
WebProjectService
listWebProjects
in interface WebProjectService
public java.util.List listWebProjects(java.lang.String userName)
WebProjectService
listWebProjects
in interface WebProjectService
userName
- user name
public boolean isWebProject(java.lang.String wpStoreId)
WebProjectService
isWebProject
in interface WebProjectService
public boolean isWebProject(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectService
isWebProject
in interface WebProjectService
wpNodeRef
- web project node ref
public WebProjectInfo getWebProject(java.lang.String wpStoreId)
WebProjectService
Returns null if the web project can not be found
getWebProject
in interface WebProjectService
wpStoreId
- web project store id
public java.lang.String getPreviewProvider(java.lang.String wpStoreId)
WebProjectService
getPreviewProvider
in interface WebProjectService
wpStoreId
- web project store id
public WebProjectInfo getWebProject(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectService
Returns null if the web project can not be found
getWebProject
in interface WebProjectService
wpNodeRef
- web project node ref
public void updateWebProject(WebProjectInfo wpInfo)
WebProjectService
Note: the nodeRef and storeId (dnsName) of a web project cannot be updated once the web project has been created
updateWebProject
in interface WebProjectService
wpInfo
- web project infopublic void deleteWebProject(java.lang.String wpStoreId)
WebProjectService
If 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 WebProjectService
public void deleteWebProject(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectService
If 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 WebProjectService
public boolean isContentManager(java.lang.String storeName)
WebProjectService
Note: This includes admin users but does not include the System user
isContentManager
in interface WebProjectService
storeName
- web project store id
public boolean isContentManager(java.lang.String wpStoreId, java.lang.String userName)
WebProjectService
Note: This includes admin users but does not include the System user
isContentManager
in interface WebProjectService
userName
- user name
public boolean isContentManager(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectService
isContentManager
in interface WebProjectService
wpNodeRef
- web project node ref
public boolean isContentManager(org.alfresco.service.cmr.repository.NodeRef wpNodeRef, java.lang.String userName)
WebProjectService
Note: This includes admin users but does not include the System user
isContentManager
in interface WebProjectService
wpNodeRef
- web project node refuserName
- user name
public boolean isWebUser(java.lang.String wpStoreId)
WebProjectService
isWebUser
in interface WebProjectService
public boolean isWebUser(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectService
isWebUser
in interface WebProjectService
wpNodeRef
- web project node ref
public boolean isWebUser(java.lang.String wpStoreId, java.lang.String username)
WebProjectService
isWebUser
in interface WebProjectService
username
- user name
public boolean isWebUser(org.alfresco.service.cmr.repository.NodeRef wpNodeRef, java.lang.String userName)
WebProjectService
isWebUser
in interface WebProjectService
wpNodeRef
- web project node refuserName
- user name
public int getWebUserCount(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectService
getWebUserCount
in interface WebProjectService
wpNodeRef
- web project node ref
public java.util.Map listWebUsers(java.lang.String wpStoreId)
WebProjectService
Current user must be a content manager for the web project
listWebUsers
in interface WebProjectService
wpStoreId
- web project store id
public java.util.Map listWebUsers(org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
WebProjectService
Current user must be a content manager for the web project
listWebUsers
in interface WebProjectService
wpNodeRef
- web project node ref
public java.lang.String getWebUserRole(java.lang.String wpStoreId, java.lang.String userName)
WebProjectService
getWebUserRole
in interface WebProjectService
wpStoreId
- web project store iduserName
- user name
public java.lang.String getWebUserRole(org.alfresco.service.cmr.repository.NodeRef wpNodeRef, java.lang.String userName)
WebProjectService
getWebUserRole
in interface WebProjectService
wpNodeRef
- web project node refuserName
- user name
public org.alfresco.service.cmr.repository.NodeRef getWebProjectNodeFromPath(java.lang.String absoluteAVMPath)
WebProjectService
getWebProjectNodeFromPath
in interface WebProjectService
absoluteAVMPath
- the AVM path from which to determine the Web Project
public org.alfresco.service.cmr.repository.NodeRef getWebProjectNodeFromStore(java.lang.String wpStoreId)
WebProjectService
getWebProjectNodeFromStore
in interface WebProjectService
wpStoreId
- the AVM store name (sandbox store id) from which to determine the Web Project
public void inviteWebUsersGroups(java.lang.String wpStoreId, java.util.Map userGroupRoles)
WebProjectService
Note: 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 WebProjectService
wpStoreId
- web project store iduserGroupRoles
- map of public void inviteWebUsersGroups(java.lang.String wpStoreId, java.util.Map userGroupRoles, boolean autoCreateAuthorSandbox)
WebProjectService
Note: authority name can be user or group, although a group is flattened into a set of users
inviteWebUsersGroups
in interface WebProjectService
wpStoreId
- 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)
WebProjectService
Note: authority name can be user or group, although a group is flattened into a set of users
inviteWebUsersGroups
in interface WebProjectService
wpNodeRef
- 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)
WebProjectService
Note: author sandbox will NOT be auto created for each invited user
inviteWebUser
in interface WebProjectService
wpStoreId
- 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)
WebProjectService
inviteWebUser
in interface WebProjectService
wpStoreId
- 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)
WebProjectService
inviteWebUser
in interface WebProjectService
wpNodeRef
- 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)
WebProjectService
Note: author sandbox will NOT be auto deleted
uninviteWebUser
in interface WebProjectService
wpStoreId
- web project store iduserAuth
- user namepublic void uninviteWebUser(java.lang.String wpStoreId, java.lang.String userAuth, boolean autoDeleteAuthorSandbox)
WebProjectService
Note: if author sandbox is auto deleted then this will cascade delete without warning (even if there are changed items)
uninviteWebUser
in interface WebProjectService
wpStoreId
- 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)
WebProjectService
Note: if author sandbox is auto deleted then this will cascade delete without warning (even if there are changed items)
uninviteWebUser
in interface WebProjectService
wpNodeRef
- web project node refuserAuth
- user nameautoDeleteAuthorSandbox
- if true then auto delete the author sandbox
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |