public class WCMUtil extends AVMUtil
| Modifier and Type | Field and Description |
|---|---|
static String |
DIR_ROOT |
static String |
LOCK_KEY_STORE_NAME |
protected static Pattern |
PATTERN_ILLEGAL_SEQUENCE
Matches character sequences that must be escaped in a compound store name.
|
static String |
ROLE_CONTENT_CONTRIBUTOR |
static String |
ROLE_CONTENT_MANAGER |
static String |
ROLE_CONTENT_PUBLISHER |
static String |
ROLE_CONTENT_REVIEWER |
protected static String |
SPACE_ICON_WEBSITE |
protected static String |
STORE_PREVIEW |
protected static String |
STORE_SEPARATOR |
protected static String |
STORE_WORKFLOW |
static 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 String |
buildSandboxRootPath(String storeName)
Returns the root path for the specified sandbox name
* eg.
|
protected static String |
buildStagingPreviewStoreName(String storeId)
Returns the preview store name for the specified store id.
|
static String |
buildStagingStoreName(String wpStoreId)
Returns the main staging store name for the specified web project
|
static String |
buildStoreRootPath(String storeName)
Returns the root path for the specified store name
eg.
|
static String |
buildStoreWebappPath(String storeName,
String webApp)
Returns the root webapp path for the specified store and webapp name
|
static String |
buildUserMainStoreName(String storeId,
String userName)
Returns the user's main store name for a specific username
|
protected static String |
buildUserPreviewStoreName(String storeId,
String username)
Returns the preview store name for a specific username.
|
protected static String |
buildWorkflowMainStoreName(String storeId,
String workflowId)
Returns the store name for a specific workflow Id.
|
protected static String |
buildWorkflowPreviewStoreName(String storeId,
String workflowId)
Returns the preview store name for a specific workflow Id.
|
static String |
escapeStoreNameComponent(String component)
Utility function for escaping part of a compound store name (delimited by STORE_SEPARATOR sequences).
|
static String |
getCommonWebApp(String sbStoreId,
List<String> storeRelativePaths) |
protected static String |
getCorrespondingMainStoreName(String storeName)
Returns the corresponding main store name if this is a preview store name.
|
static String |
getCorrespondingPath(String avmPath,
String otherStoreName)
Returns the corresponding path in the store provided.
|
protected static String |
getCorrespondingPathInMainStore(String avmPath)
Returns the corresponding path in the main store name if this is a path in
a preview store.
|
protected static String |
getCorrespondingPathInPreviewStore(String avmPath)
Returns the corresponding path in the preview store name if this is a path in
a main store.
|
protected static String |
getCorrespondingPreviewStoreName(String storeName)
Returns the corresponding preview store name if this is a main store name.
|
protected static String |
getSandboxPath(String absoluteAVMPath)
Returns the path portion up the sandbox
|
protected static String |
getSandboxRelativePath(String absoluteAVMPath)
Returns a path relative to the sandbox porition of the avm path.
|
static String |
getSandboxStoreId(String avmPath)
Extracts the sandbox store id from the avm path
|
static String |
getStoreRelativePath(String absoluteAVMPath)
Returns a path relative to the store portion of the avm path.
|
static String |
getUserName(String storeName)
Extracts the username from the store name.
|
static String |
getWebapp(String absoluteAVMPath)
Returns the webapp within the path
|
protected static String |
getWebappPath(String absoluteAVMPath)
Returns the path portion up the webapp
|
protected static String |
getWebappRelativePath(String absoluteAVMPath)
Returns a path relative to the webapp portion of the avm path.
|
static String |
getWebProject(AVMService avmService,
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,
String wpStoreId) |
static String |
getWebProjectStoreId(String storeName)
Extracts the web project store id from the (sandbox) store name
|
static String |
getWebProjectStoreIdFromPath(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 String |
getWorkflowId(String storeName)
Extracts the workflow id
|
protected static boolean |
isLocalhostDeployedStore(String wpStoreId,
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(String storeName)
Indicates whether the store name describes a preview store.
|
static boolean |
isStagingStore(String storeName)
Indicates whether the store name describes a staging store.
|
static boolean |
isUserStore(String storeName)
Indicates whether the store name describes a user store.
|
protected static boolean |
isWorkflowStore(String storeName)
Indicates whether the store name describes a workflow store.
|
protected static List<org.alfresco.service.cmr.repository.ChildAssociationRef> |
listWebUserRefs(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.NodeRef wpNodeRef,
boolean preLoad) |
protected static Map<String,String> |
listWebUsers(org.alfresco.service.cmr.repository.NodeService nodeService,
org.alfresco.service.cmr.repository.NodeRef wpNodeRef) |
static String |
lookupStoreDNS(AVMService avmService,
String store) |
protected static void |
removeAllVServerWebapps(VirtServerRegistry vServerRegistry,
String path,
boolean force)
Removal notification on all the virtualisation server webapp as required by the specified path
|
protected static void |
removeVServerWebapp(VirtServerRegistry vServerRegistry,
String path,
boolean force)
Removal notification on the virtualisation server webapp as required for the specified path
|
static void |
updateVServerWebapp(VirtServerRegistry vServerRegistry,
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 String STORE_SEPARATOR
protected static final Pattern PATTERN_ILLEGAL_SEQUENCE
protected static final String STORE_WORKFLOW
protected static final String STORE_PREVIEW
public static final String DIR_ROOT
protected static final String SPACE_ICON_WEBSITE
public static final String LOCK_KEY_STORE_NAME
public static final String ROLE_CONTENT_MANAGER
public static final String ROLE_CONTENT_PUBLISHER
public static final String ROLE_CONTENT_CONTRIBUTOR
public static final String ROLE_CONTENT_REVIEWER
public static final String WORKFLOW_SUBMITDIRECT_NAME
public static String getSandboxStoreId(String avmPath)
avmPath - an absolute avm pathpublic static String getWebProjectStoreId(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 String getWebProjectStoreIdFromPath(String avmPath)
avmPath - an absolute avm pathprotected static boolean isPreviewStore(String storeName)
storeName - the store nameprotected static boolean isLocalhostDeployedStore(String wpStoreId, String storeName)
storeName - protected static boolean isWorkflowStore(String storeName)
storeName - the store namepublic static boolean isUserStore(String storeName)
storeName - the store namepublic static boolean isStagingStore(String storeName)
storeName - the store namepublic static String getUserName(String storeName)
storeName - the store namepublic static String getWorkflowId(String storeName)
storeName - protected static String getCorrespondingMainStoreName(String storeName)
storeName - the preview store name.IllegalArgumentException - if this is not a preview store name.protected static String getCorrespondingPreviewStoreName(String storeName)
storeName - the main store name.IllegalArgumentException - if this is not a main store name.protected static String getCorrespondingPathInMainStore(String avmPath)
avmPath - an avm path within the main store.IllegalArgumentException - if this is not a path within the preview store.protected static String getCorrespondingPathInPreviewStore(String avmPath)
avmPath - an avm path within the main store.IllegalArgumentException - if this is not a path within the preview store.public static String getCorrespondingPath(String avmPath, String otherStoreName)
avmPath - an avm pathotherStore - the other store name to return the corresponding path forpublic static final String escapeStoreNameComponent(String component)
component - the componentpublic static String buildStagingStoreName(String wpStoreId)
wpStoreId - web project store id to build staging store name forprotected static String buildStagingPreviewStoreName(String storeId)
storeId - store id to build preview store name forpublic static String buildUserMainStoreName(String storeId, String userName)
storeId - store id to build user store name forusername - of the user to build store name forprotected static String buildUserPreviewStoreName(String storeId, String username)
storeId - store id to build user preview store name forusername - of the user to build preview store name forprotected static String buildWorkflowMainStoreName(String storeId, String workflowId)
storeId - store id to build workflow store name forworkflowId - of the user to build workflow store name forprotected static String buildWorkflowPreviewStoreName(String storeId, String workflowId)
storeId - store id to build preview workflow store name forworkflowId - of the user to build preview workflow store name forpublic static String buildStoreRootPath(String storeName)
storeName - store to build root path forpublic static String buildSandboxRootPath(String storeName)
storeName - store to build root sandbox path forpublic static String buildStoreWebappPath(String storeName, String webApp)
storeName - store to build root webapp path forwebapp - webapp folder namepublic static String lookupStoreDNS(AVMService avmService, String store)
public static org.alfresco.service.cmr.repository.NodeRef getWebProjectNodeFromWebProjectStore(AVMService avmService, String wpStoreId)
public static String getWebProject(AVMService avmService, String avmStoreName)
public static String getStoreRelativePath(String absoluteAVMPath)
absoluteAVMPath - an absolute path within the avmprotected static String getWebappRelativePath(String absoluteAVMPath)
absoluteAVMPath - an absolute path within the avmpublic static String getWebapp(String absoluteAVMPath)
absoluteAVMPath - the path from which to extract the webapp nameprotected static String getWebappPath(String absoluteAVMPath)
absoluteAVMPath - the path from which to extract the webapp pathprotected static String getSandboxRelativePath(String absoluteAVMPath)
absoluteAVMPath - an absolute path within the avmprotected static String getSandboxPath(String absoluteAVMPath)
absoluteAVMPath - the path from which to extract the sandbox pathprotected static Map<String,String> listWebUsers(org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.cmr.repository.NodeRef wpNodeRef)
protected static List<org.alfresco.service.cmr.repository.ChildAssociationRef> listWebUserRefs(org.alfresco.service.cmr.repository.NodeService nodeService, org.alfresco.service.cmr.repository.NodeRef wpNodeRef, boolean preLoad)
public static void updateVServerWebapp(VirtServerRegistry vServerRegistry, String path, boolean force)
path - Path to match againstforce - True to force update of server even if path does not matchprotected static void removeAllVServerWebapps(VirtServerRegistry vServerRegistry, String path, boolean force)
path - Path to match againstforce - True to force update of server even if path does not matchprotected static void removeVServerWebapp(VirtServerRegistry vServerRegistry, String path, boolean force)
path - Path to match againstforce - True to force update of server even if path does not matchCopyright © 2005–2014 Alfresco Software. All rights reserved.