mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
MOB-690 - WCM PreviewURIService - checkpoint
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@14642 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -198,7 +198,7 @@ public final class AVM extends BaseScopableProcessorExtension
|
||||
*/
|
||||
public String websiteStagingUrl(String storeId)
|
||||
{
|
||||
return WCMUtil.buildStoreUrl(this.services.getAVMService(), storeId, getVServerDomain(), getVServerPort());
|
||||
return this.services.getPreviewURIService().getPreviewURI(storeId, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -220,9 +220,9 @@ public final class AVM extends BaseScopableProcessorExtension
|
||||
*
|
||||
* @return the preview URL to the specified store asset
|
||||
*/
|
||||
public String assetUrl(String store, String assetPath)
|
||||
public String assetUrl(String storeId, String assetPath)
|
||||
{
|
||||
return WCMUtil.buildAssetUrl(assetPath, getVServerDomain(), getVServerPort(), WCMUtil.lookupStoreDNS(this.services.getAVMService(), store));
|
||||
return this.services.getPreviewURIService().getPreviewURI(storeId, assetPath);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -241,32 +241,6 @@ public final class AVM extends BaseScopableProcessorExtension
|
||||
return assetUrl(s[0], s[1]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return VServer Port
|
||||
*/
|
||||
private String getVServerPort()
|
||||
{
|
||||
Integer port = this.services.getVirtServerRegistry().getVirtServerHttpPort();
|
||||
if (port == null)
|
||||
{
|
||||
port = JNDIConstants.DEFAULT_VSERVER_PORT;
|
||||
}
|
||||
return port.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return VServer Domain
|
||||
*/
|
||||
private String getVServerDomain()
|
||||
{
|
||||
String domain = this.services.getVirtServerRegistry().getVirtServerFQDN();
|
||||
if (domain == null)
|
||||
{
|
||||
domain = JNDIConstants.DEFAULT_VSERVER_IP;
|
||||
}
|
||||
return domain;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the path to the webapps folder in a standard web store.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user