public class WCMUtil extends AVMUtil
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DIR_ROOT |
static java.lang.String |
LOCK_KEY_STORE_NAME |
protected static java.util.regex.Pattern |
PATTERN_ILLEGAL_SEQUENCE
Matches character sequences that must be escaped in a compound store name.
|
static java.lang.String |
ROLE_CONTENT_CONTRIBUTOR |
static java.lang.String |
ROLE_CONTENT_MANAGER |
static java.lang.String |
ROLE_CONTENT_PUBLISHER |
static java.lang.String |
ROLE_CONTENT_REVIEWER |
protected static java.lang.String |
SPACE_ICON_WEBSITE |
protected static java.lang.String |
STORE_PREVIEW |
protected static java.lang.String |
STORE_SEPARATOR |
protected static java.lang.String |
STORE_WORKFLOW |
static java.lang.String |
WORKFLOW_SUBMITDIRECT_NAME |
AVM_PATH_SEPARATOR, AVM_PATH_SEPARATOR_CHAR, AVM_STORE_SEPARATOR, AVM_STORE_SEPARATOR_CHAR, INITIAL_SNAPSHOT| Constructor and Description |
|---|
WCMUtil() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
buildSandboxRootPath(java.lang.String storeName)
Returns the root path for the specified sandbox name
* eg.
|
protected static java.lang.String |
buildStagingPreviewStoreName(java.lang.String storeId)
Returns the preview store name for the specified store id.
|
static java.lang.String |
buildStagingStoreName(java.lang.String wpStoreId)
Returns the main staging store name for the specified web project
|
static java.lang.String |
buildStoreRootPath(java.lang.String storeName)
Returns the root path for the specified store name
eg.
|
static java.lang.String |
buildStoreWebappPath(java.lang.String storeName,
java.lang.String webApp)
Returns the root webapp path for the specified store and webapp name
|
static java.lang.String |
buildUserMainStoreName(java.lang.String storeId,
java.lang.String userName)
Returns the user's main store name for a specific username
|
protected static java.lang.String |
buildUserPreviewStoreName(java.lang.String storeId,
java.lang.String username)
Returns the preview store name for a specific username.
|
protected static java.lang.String |
buildWorkflowMainStoreName(java.lang.String storeId,
java.lang.String workflowId)
Returns the store name for a specific workflow Id.
|
protected static java.lang.String |
buildWorkflowPreviewStoreName(java.lang.String storeId,
java.lang.String workflowId)
Returns the preview store name for a specific workflow Id.
|
static java.lang.String |
escapeStoreNameComponent(java.lang.String component)
Utility function for escaping part of a compound store name (delimited by STORE_SEPARATOR sequences).
|
static java.lang.String |
getCommonWebApp(java.lang.String sbStoreId,
java.util.List storeRelativePaths) |
protected static java.lang.String |
getCorrespondingMainStoreName(java.lang.String storeName)
Returns the corresponding main store name if this is a preview store name.
|
static java.lang.String |
getCorrespondingPath(java.lang.String avmPath,
java.lang.String otherStoreName)
Returns the corresponding path in the store provided.
|
protected static java.lang.String |
getCorrespondingPathInMainStore(java.lang.String avmPath)
Returns the corresponding path in the main store name if this is a path in
a preview store.
|
protected static java.lang.String |
getCorrespondingPathInPreviewStore(java.lang.String avmPath)
Returns the corresponding path in the preview store name if this is a path in
a main store.
|
protected static java.lang.String |
getCorrespondingPreviewStoreName(java.lang.String storeName)
Returns the corresponding preview store name if this is a main store name.
|
protected static java.lang.String |
getSandboxPath(java.lang.String absoluteAVMPath)
Returns the path portion up the sandbox
|
protected static java.lang.String |
getSandboxRelativePath(java.lang.String absoluteAVMPath)
Returns a path relative to the sandbox porition of the avm path.
|
static java.lang.String |
getSandboxStoreId(java.lang.String avmPath)
Extracts the sandbox store id from the avm path
|
static java.lang.String |
getStoreRelativePath(java.lang.String absoluteAVMPath)
Returns a path relative to the store portion of the avm path.
|
static java.lang.String |
getUserName(java.lang.String storeName)
Extracts the username from the store name.
|
static java.lang.String |
getWebapp(java.lang.String absoluteAVMPath)
Returns the webapp within the path
|
protected static java.lang.String |
getWebappPath(java.lang.String absoluteAVMPath)
Returns the path portion up the webapp
|
protected static java.lang.String |
getWebappRelativePath(java.lang.String absoluteAVMPath)
Returns a path relative to the webapp portion of the avm path.
|
static java.lang.String |
getWebProject(AVMService avmService,
java.lang.String avmStoreName)
Returns web project store id for an AVM store name (or null for vanilla AVM store)
|
static org.alfresco.service.cmr.repository.NodeRef |
getWebProjectNodeFromWebProjectStore(AVMService avmService,
java.lang.String wpStoreId) |
static java.lang.String |
getWebProjectStoreId(java.lang.String storeName)
Extracts the web project store id from the (sandbox) store name
|
static java.lang.String |
getWebProjectStoreIdFromPath(java.lang.String avmPath)
Extracts the web project store id from the avm path
For example, if the avm path is: teststore--admin:/www/ROOT then the web project id is: teststore
|
static java.lang.String |
getWorkflowId(java.lang.String storeName)
Extracts the workflow id
|
protected static boolean |
isLocalhostDeployedStore(java.lang.String wpStoreId,
java.lang.String storeName)
http://wiki.alfresco.com/wiki/WCM_Deployment_Features#Debugging_.26_Testing
Examples of locally deployed store names for web project "MyWebProj" are:
MyWebProjlive
MyWebProj--adminlive
Note: if web project "MyWebProjlive" is pre-created then should be possible to browse staging:
http://wiki.alfresco.com/wiki/WCM_Deployment_Features#Deployed_Runtime
|
protected static boolean |
isPreviewStore(java.lang.String storeName)
Indicates whether the store name describes a preview store.
|
static boolean |
isStagingStore(java.lang.String storeName)
Indicates whether the store name describes a staging store.
|
static boolean |
isUserStore(java.lang.String storeName)
Indicates whether the store name describes a user store.
|
protected static boolean |
isWorkflowStore(java.lang.String storeName)
Indicates whether the store name describes a workflow store.
|
protected static java.util.List |
listWebUserRefs(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
boolean preLoad) |
protected static java.util.Map |
listWebUsers(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.NodeRef wpNodeRef) |
static java.lang.String |
lookupStoreDNS(AVMService avmService,
java.lang.String store) |
protected static void |
removeAllVServerWebapps(org.alfresco.mbeans.VirtServerRegistry vServerRegistry,
java.lang.String path,
boolean force)
Removal notification on all the virtualisation server webapp as required by the specified path
|
protected static void |
removeVServerWebapp(org.alfresco.mbeans.VirtServerRegistry vServerRegistry,
java.lang.String path,
boolean force)
Removal notification on the virtualisation server webapp as required for the specified path
|
static void |
updateVServerWebapp(org.alfresco.mbeans.VirtServerRegistry vServerRegistry,
java.lang.String path,
boolean force)
Update notification on the virtualisation server webapp as required for the specified path
|
addLeadingSlash, buildAVMPath, extendAVMPath, getStoreName, normalizePath, splitBase, splitPathprotected static final java.lang.String STORE_SEPARATOR
protected static final java.util.regex.Pattern PATTERN_ILLEGAL_SEQUENCE
protected static final java.lang.String STORE_WORKFLOW
protected static final java.lang.String STORE_PREVIEW
public static final java.lang.String DIR_ROOT
protected static final java.lang.String SPACE_ICON_WEBSITE
public static final java.lang.String LOCK_KEY_STORE_NAME
public static final java.lang.String ROLE_CONTENT_MANAGER
public static final java.lang.String ROLE_CONTENT_PUBLISHER
public static final java.lang.String ROLE_CONTENT_CONTRIBUTOR
public static final java.lang.String ROLE_CONTENT_REVIEWER
public static final java.lang.String WORKFLOW_SUBMITDIRECT_NAME
public static java.lang.String getSandboxStoreId(java.lang.String avmPath)
avmPath - an absolute avm pathpublic static java.lang.String getWebProjectStoreId(java.lang.String storeName)
For example, if the (sandbox) store name is: teststore--admin then the web project store id is: teststore
Note: Although the staging sandbox store name is currently equivalent to the web project store id, it should be derived using 'buildStagingStoreName'.
storeName - the sandbox store idpublic static java.lang.String getWebProjectStoreIdFromPath(java.lang.String avmPath)
avmPath - an absolute avm pathprotected static boolean isPreviewStore(java.lang.String storeName)
storeName - the store nameprotected static boolean isLocalhostDeployedStore(java.lang.String wpStoreId,
java.lang.String storeName)
storeName - protected static boolean isWorkflowStore(java.lang.String storeName)
storeName - the store namepublic static boolean isUserStore(java.lang.String storeName)
storeName - the store namepublic static boolean isStagingStore(java.lang.String storeName)
storeName - the store namepublic static java.lang.String getUserName(java.lang.String storeName)
storeName - the store namepublic static java.lang.String getWorkflowId(java.lang.String storeName)
storeName - protected static java.lang.String getCorrespondingMainStoreName(java.lang.String storeName)
storeName - the preview store name.java.lang.IllegalArgumentException - if this is not a preview store name.protected static java.lang.String getCorrespondingPreviewStoreName(java.lang.String storeName)
storeName - the main store name.java.lang.IllegalArgumentException - if this is not a main store name.protected static java.lang.String getCorrespondingPathInMainStore(java.lang.String avmPath)
avmPath - an avm path within the main store.java.lang.IllegalArgumentException - if this is not a path within the preview store.protected static java.lang.String getCorrespondingPathInPreviewStore(java.lang.String avmPath)
avmPath - an avm path within the main store.java.lang.IllegalArgumentException - if this is not a path within the preview store.public static java.lang.String getCorrespondingPath(java.lang.String avmPath,
java.lang.String otherStoreName)
avmPath - an avm pathotherStore - the other store name to return the corresponding path forpublic static final java.lang.String escapeStoreNameComponent(java.lang.String component)
component - the componentpublic static java.lang.String buildStagingStoreName(java.lang.String wpStoreId)
wpStoreId - web project store id to build staging store name forprotected static java.lang.String buildStagingPreviewStoreName(java.lang.String storeId)
storeId - store id to build preview store name forpublic static java.lang.String buildUserMainStoreName(java.lang.String storeId,
java.lang.String userName)
storeId - store id to build user store name forusername - of the user to build store name forprotected static java.lang.String buildUserPreviewStoreName(java.lang.String storeId,
java.lang.String username)
storeId - store id to build user preview store name forusername - of the user to build preview store name forprotected static java.lang.String buildWorkflowMainStoreName(java.lang.String storeId,
java.lang.String workflowId)
storeId - store id to build workflow store name forworkflowId - of the user to build workflow store name forprotected static java.lang.String buildWorkflowPreviewStoreName(java.lang.String storeId,
java.lang.String workflowId)
storeId - store id to build preview workflow store name forworkflowId - of the user to build preview workflow store name forpublic static java.lang.String buildStoreRootPath(java.lang.String storeName)
storeName - store to build root path forpublic static java.lang.String buildSandboxRootPath(java.lang.String storeName)
storeName - store to build root sandbox path forpublic static java.lang.String buildStoreWebappPath(java.lang.String storeName,
java.lang.String webApp)
storeName - store to build root webapp path forwebapp - webapp folder namepublic static java.lang.String lookupStoreDNS(AVMService avmService, java.lang.String store)
public static org.alfresco.service.cmr.repository.NodeRef getWebProjectNodeFromWebProjectStore(AVMService avmService, java.lang.String wpStoreId)
public static java.lang.String getWebProject(AVMService avmService, java.lang.String avmStoreName)
public static java.lang.String getStoreRelativePath(java.lang.String absoluteAVMPath)
absoluteAVMPath - an absolute path within the avmprotected static java.lang.String getWebappRelativePath(java.lang.String absoluteAVMPath)
absoluteAVMPath - an absolute path within the avmpublic static java.lang.String getWebapp(java.lang.String absoluteAVMPath)
absoluteAVMPath - the path from which to extract the webapp nameprotected static java.lang.String getWebappPath(java.lang.String absoluteAVMPath)
absoluteAVMPath - the path from which to extract the webapp pathprotected static java.lang.String getSandboxRelativePath(java.lang.String absoluteAVMPath)
absoluteAVMPath - an absolute path within the avmprotected static java.lang.String getSandboxPath(java.lang.String absoluteAVMPath)
absoluteAVMPath - the path from which to extract the sandbox pathprotected static java.util.Map listWebUsers(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
protected static java.util.List listWebUserRefs(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
boolean preLoad)
public static void updateVServerWebapp(org.alfresco.mbeans.VirtServerRegistry vServerRegistry,
java.lang.String path,
boolean force)
path - Path to match againstforce - True to force update of server even if path does not matchprotected static void removeAllVServerWebapps(org.alfresco.mbeans.VirtServerRegistry vServerRegistry,
java.lang.String path,
boolean force)
path - Path to match againstforce - True to force update of server even if path does not matchprotected static void removeVServerWebapp(org.alfresco.mbeans.VirtServerRegistry vServerRegistry,
java.lang.String path,
boolean force)
path - Path to match againstforce - True to force update of server even if path does not matchpublic static java.lang.String getCommonWebApp(java.lang.String sbStoreId,
java.util.List storeRelativePaths)
Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.