Class SiteProperties

java.lang.Object
org.craftercms.engine.properties.SiteProperties

public class SiteProperties extends Object
Properties specific of the current site.
Author:
avasquez
  • Field Details

  • Constructor Details

    • SiteProperties

      public SiteProperties()
  • Method Details

    • isTargetingEnabled

      public static boolean isTargetingEnabled()
      Returns trues if targeting is enabled.
    • getAvailableTargetIds

      public static String[] getAvailableTargetIds()
      Returns the list of available target IDs.
    • getFallbackTargetId

      public static String getFallbackTargetId()
      Returns the fallback target ID. The fallback target ID is used in case none of the resolved candidate targeted URLs map to existing content.
    • getRootFolders

      public static String[] getRootFolders()
      Returns the folders that will be handled for targeted content.
    • getExcludePatterns

      public static String[] getExcludePatterns()
      Returns the patterns that a path might match if it should be excluded
    • isMergeFolders

      public static boolean isMergeFolders()
      Returns true if the sub items of folders with the same family of target IDs should be merged (e.g. "en_US" and "en" are of the same family).
    • isRedirectToTargetedUrl

      public static boolean isRedirectToTargetedUrl()
      Returns true if the request should be redirected when the targeted URL is different from the current URL.
    • getIndexFileName

      public static final String getIndexFileName()
      Returns the name of a page's index file, or DEFAULT_INDEX_FILE_NAME if not in configuration.
    • isDisableFullModelTypeConversion

      public static boolean isDisableFullModelTypeConversion()
      Returns true if full content model type conversion should be disabled. Up to and including version 2: Crafter Engine, in the FreeMarker host only, converts model elements based on a suffix type hint, but only for the first level in the model, and not for _dt. For example, for contentModel.myvalue_i Integer is returned, but for contentModel.repeater.myvalue_i and contentModel.date_dt a String is returned. In the Groovy host no type of conversion was performed. In version 3 onwards, Crafter Engine converts elements with any suffix type hints (including _dt) at at any level in the content model and for both Freemarker and Groovy hosts.
    • getNavigationAdditionalFields

      public static String[] getNavigationAdditionalFields()
      Returns the list of additional fields that navigation items should extract from the item descriptor.
    • isSpaEnabled

      public static boolean isSpaEnabled()
      Returns true if SPA (Single Page App) mode is enabled.
    • getSpaViewName

      public static String getSpaViewName()
      Returns the view name for the SPA (Single Page Application). Current view names can be a page URL (like /) or a template name (like /template/web/app.ftl). By default, if SPA is enabled and no view name config property is found, / is returned.
    • getDescriptorPreloadFolders

      public static final Map<String,Integer> getDescriptorPreloadFolders()
      Gets the list of descriptor folders to preload in the cache. Each folder can have it's depth specified after a colon, like PATH:DEPTH
    • getContentPreloadFolders

      public static final Map<String,Integer> getContentPreloadFolders()
      Gets the list of content folders to preload in the cache. Each folder can have it's depth specified after a colon, like PATH:DEPTH