Package org.craftercms.engine.properties
Class SiteProperties
java.lang.Object
org.craftercms.engine.properties.SiteProperties
Properties specific of the current site.
- Author:
- avasquez
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final StringCache warm-up propertiesstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String[]Returns the list of available target IDs.Gets the list of content folders to preload in the cache.Gets the list of descriptor folders to preload in the cache.static String[]Returns the patterns that a path might match if it should be excludedstatic StringReturns the fallback target ID.static final StringReturns the name of a page's index file, orDEFAULT_INDEX_FILE_NAMEif not in configuration.static String[]Returns the list of additional fields that navigation items should extract from the item descriptor.static String[]Returns the folders that will be handled for targeted content.static StringReturns the view name for the SPA (Single Page Application).static booleanReturns true if full content model type conversion should be disabled.static booleanReturns true if the sub items of folders with the same family of target IDs should be merged (e.g.static booleanReturns true if the request should be redirected when the targeted URL is different from the current URL.static booleanReturns true if SPA (Single Page App) mode is enabled.static booleanReturns trues if targeting is enabled.
-
Field Details
-
INDEX_FILE_NAME_CONFIG_KEY
- See Also:
-
DISABLE_FULL_MODEL_TYPE_CONVERSION_CONFIG_KEY
- See Also:
-
NAVIGATION_ADDITIONAL_FIELDS_CONFIG_KEY
- See Also:
-
SPA_ENABLED_CONFIG_KEY
- See Also:
-
SPA_VIEW_NAME
- See Also:
-
TARGETING_ENABLED_CONFIG_KEY
- See Also:
-
AVAILABLE_TARGET_IDS_CONFIG_KEY
- See Also:
-
FALLBACK_ID_CONFIG_KEY
- See Also:
-
ROOT_FOLDERS_CONFIG_KEY
- See Also:
-
EXCLUDE_PATTERNS_CONFIG_KEY
- See Also:
-
MERGE_FOLDERS_CONFIG_KEY
- See Also:
-
REDIRECT_TO_TARGETED_URL_CONFIG_KEY
- See Also:
-
CACHE_WARMUP_DESCRIPTOR_FOLDERS_CONFIG_KEY
Cache warm-up properties- See Also:
-
CACHE_WARMUP_CONTENT_FOLDERS_CONFIG_KEY
- See Also:
-
DEFAULT_INDEX_FILE_NAME
- See Also:
-
DEFAULT_SPA_VIEW_NAME
- See Also:
-
-
Constructor Details
-
SiteProperties
public SiteProperties()
-
-
Method Details
-
isTargetingEnabled
public static boolean isTargetingEnabled()Returns trues if targeting is enabled. -
getAvailableTargetIds
Returns the list of available target IDs. -
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
Returns the folders that will be handled for targeted content. -
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
Returns the name of a page's index file, orDEFAULT_INDEX_FILE_NAMEif 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. -
isSpaEnabled
public static boolean isSpaEnabled()Returns true if SPA (Single Page App) mode is enabled. -
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
Gets the list of descriptor folders to preload in the cache. Each folder can have it's depth specified after a colon, likePATH:DEPTH -
getContentPreloadFolders
Gets the list of content folders to preload in the cache. Each folder can have it's depth specified after a colon, likePATH:DEPTH
-