com.bemoko.live.platform.mwc.sites
Class SiteUtils

java.lang.Object
  extended by com.bemoko.live.platform.mwc.sites.SiteUtils

public class SiteUtils
extends Object


Field Summary
protected static Log log
           
 
Constructor Summary
SiteUtils()
           
 
Method Summary
static String createFullSiteName(String... siteNames)
          Create full site name from an array of site and subsite names
static String getAddonName(String siteName, String relativeAddonName)
           
static String getChildSiteName(String siteName, String relativeChildSiteName)
          Get the full child site name from site name and the relative child site name, e.g.
static String getContainingSiteName(String siteName)
          Deprecated. As of 1.8 use SiteNaming
 LiveExpressionManager getExpressionManager()
           
static String getLinkedSiteName(String siteName, String relativeChildSiteName)
           
static String getPath(String siteName)
          Get the path to the site (or sub-site) relative from the site location root, e.g.
static String getPathWithoutLeadingSlash(String siteName)
          Deprecated. please use getPath
static String getRelativePath(String siteName)
          Get the path to the site relative to the container, e.g.
static String getRelativeSiteName(String siteName)
          Deprecated. As of 1.8 use SiteNaming
static String getSiteNameFromSubsitePath(String sitePath)
          e.g.
static String getSiteNameWithInheritance(String siteName)
          Deprecated. As of 1.8 use SiteNaming
static String getSiteNameWithoutInheritance(String siteName)
          Deprecated. As of 1.8 use SiteNaming
 boolean isTemplatable(InteractionContext interaction, String contentType)
           
 boolean isTweakable(InteractionContext interaction, String contentType)
          Is the content tweakable
 void setExpressionManager(LiveExpressionManager expressionManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final Log log
Constructor Detail

SiteUtils

public SiteUtils()
Method Detail

setExpressionManager

public void setExpressionManager(LiveExpressionManager expressionManager)

getExpressionManager

public LiveExpressionManager getExpressionManager()

isTemplatable

public boolean isTemplatable(InteractionContext interaction,
                             String contentType)

isTweakable

public boolean isTweakable(InteractionContext interaction,
                           String contentType)
Is the content tweakable

Parameters:
interaction -
contentType -
Returns:
boolean

getContainingSiteName

@Deprecated
public static String getContainingSiteName(String siteName)
Deprecated. As of 1.8 use SiteNaming

See SiteNaming.getContainingSiteName()

Parameters:
siteName -
Returns:
String

getRelativeSiteName

@Deprecated
public static String getRelativeSiteName(String siteName)
Deprecated. As of 1.8 use SiteNaming

See SiteNaming.getRelativeName()

Parameters:
siteName -
Returns:
String

getSiteNameWithInheritance

@Deprecated
public static String getSiteNameWithInheritance(String siteName)
Deprecated. As of 1.8 use SiteNaming

See SiteNaming.getSiteNameWithInheritance()

Parameters:
siteName -
Returns:
String

getSiteNameWithoutInheritance

@Deprecated
public static String getSiteNameWithoutInheritance(String siteName)
Deprecated. As of 1.8 use SiteNaming

Please use InheritableName#getSiteNameWithoutInheritance()

Parameters:
siteName -
Returns:
String

getPathWithoutLeadingSlash

@Deprecated
public static String getPathWithoutLeadingSlash(String siteName)
Deprecated. please use getPath

Get site path without a leading slash.

Parameters:
siteName -
Returns:
String

getPath

public static String getPath(String siteName)
Get the path to the site (or sub-site) relative from the site location root, e.g. "test" for "test" or "=test", "/test/subsite1" for "test~subsite1" and "/test/addons/addon1 for "test$addon1"

Parameters:
siteName -
Returns:
String the physical path of the first site name

getRelativePath

public static String getRelativePath(String siteName)
Get the path to the site relative to the container, e.g. for site~subsite1 return subsite1 and for site$addon1 return site/addons/addon1

Parameters:
siteName -
Returns:
String

getChildSiteName

public static String getChildSiteName(String siteName,
                                      String relativeChildSiteName)
Get the full child site name from site name and the relative child site name, e.g. returns test~subsite

Parameters:
siteName -
relativeChildSiteName -
Returns:
String

getLinkedSiteName

public static String getLinkedSiteName(String siteName,
                                       String relativeChildSiteName)

getAddonName

public static String getAddonName(String siteName,
                                  String relativeAddonName)

getSiteNameFromSubsitePath

public static String getSiteNameFromSubsitePath(String sitePath)
e.g. convert test/subsite to test~subsite

Parameters:
sitePath -
Returns:
String

createFullSiteName

public static String createFullSiteName(String... siteNames)
Create full site name from an array of site and subsite names

Parameters:
siteNames -
Returns:
String