mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
. WCM UI
- Added Preview action for individual folders and files to the website browse page - Added Preview action for files/folders in the Modified Files list for a user sandbox - these changes allow the user to preview any sub-section (folder/weapp) or individual file in the website git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3923 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -67,19 +67,28 @@ public final class AVMConstants
|
||||
|
||||
public static String buildAVMStoreUrl(String store)
|
||||
{
|
||||
String url = null;;
|
||||
ClientConfigElement config = Application.getClientConfig(FacesContext.getCurrentInstance());
|
||||
return MessageFormat.format(PREVIEW_SANDBOX_URL, lookupStoreDNS(store), config.getWCMDomain(), config.getWCMPort());
|
||||
}
|
||||
|
||||
public static String buildAVMAssetUrl(String store, String assetPath)
|
||||
{
|
||||
ClientConfigElement config = Application.getClientConfig(FacesContext.getCurrentInstance());
|
||||
return MessageFormat.format(PREVIEW_ASSET_URL, lookupStoreDNS(store), config.getWCMDomain(), config.getWCMPort(), assetPath);
|
||||
}
|
||||
|
||||
public static String lookupStoreDNS(String store)
|
||||
{
|
||||
String dns = null;
|
||||
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
AVMService avmService = Repository.getServiceRegistry(fc).getAVMService();
|
||||
ClientConfigElement config = Application.getClientConfig(fc);
|
||||
AVMService avmService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getAVMService();
|
||||
Map<QName, PropertyValue> props = avmService.queryStorePropertyKey(store, QName.createQName(null, PROP_DNS + '%'));
|
||||
if (props.size() == 1)
|
||||
{
|
||||
String dns = props.entrySet().iterator().next().getKey().getLocalName().substring(PROP_DNS.length());
|
||||
url = MessageFormat.format(PREVIEW_SANDBOX_URL, dns, config.getWCMDomain(), config.getWCMPort());
|
||||
dns = props.entrySet().iterator().next().getKey().getLocalName().substring(PROP_DNS.length());
|
||||
}
|
||||
|
||||
return url;
|
||||
return dns;
|
||||
}
|
||||
|
||||
// names of the stores representing the layers for an AVM website
|
||||
|
Reference in New Issue
Block a user