Preview and Staging area Preview URLs generated for the website view now respect current webapp

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4596 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2006-12-13 16:28:37 +00:00
parent d9e7a9e5ad
commit 0f63f02fd5
3 changed files with 22 additions and 6 deletions

View File

@@ -123,6 +123,22 @@ public final class AVMConstants
return MessageFormat.format(PREVIEW_SANDBOX_URL, lookupStoreDNS(store), config.getWCMDomain(), config.getWCMPort());
}
public static String buildAVMWebappUrl(String store, String webapp)
{
if (webapp == null || webapp.length() == 0)
{
throw new IllegalArgumentException("Webapp name is mandatory.");
}
if (!webapp.equals(DIR_ROOT))
{
return buildAVMStoreUrl(store) + '/' + webapp;
}
else
{
return buildAVMStoreUrl(store);
}
}
public static String buildAVMAssetUrl(final String avmPath)
{
if (avmPath == null || avmPath.length() == 0)