public interface IContentManagementSystem
Modifier and Type | Method and Description |
---|---|
void |
addSupportedLanguage(Locale language)
Adds a supported language
|
String |
co(String uri)
Returns the value of the ContentObject at the given URI in the currently active language.
|
String |
co(String uri,
List<Object> formatObjects)
Returns the value of the ContentObject at the given URI in the currently active language.
|
String |
coLocale(String uri,
Locale locale)
Returns the value of the ContentObject in the given language.
|
String |
coLocale(String uri,
String locale)
Returns the value of the ContentObject in the given language.
|
String |
cr(String uri)
Returns a link to the content object with the given uri.
|
IContentObject |
findContentObject(String uri)
Gets the content object with the given uri.
|
IContentObjectValue |
findContentObjectValue(String uri,
Locale language)
Gets the currently valid content object value with the given uri and language.
|
IContentObject |
getContentObject(String uri)
Gets the content object with the given uri.
|
IContentObjectValue |
getContentObjectValue(String uri,
Locale language)
Gets the currently valid content object value with the given uri and language.
|
Locale |
getDefaultLanguage()
Gets the default language of this cms
|
IContentObject |
getRootContentObject()
Gets the root content object of this content management system
|
List<Locale> |
getSupportedLanguages()
Gets the supported languages as a list of
Locale objects. |
boolean |
isSupportedLanguage(Locale language)
Returns true if the given language is supported
|
void |
setDefaultLanguage(Locale defaultLanguage)
Sets the default supported language of this cms
|
List<Locale> getSupportedLanguages() throws PersistencyException
Locale
objects.Locale
objectsPersistencyException
- if DB access failsvoid addSupportedLanguage(Locale language) throws PersistencyException
language
- language to addPersistencyException
- if DB access failsboolean isSupportedLanguage(Locale language) throws PersistencyException
language
- language to checkPersistencyException
- if DB access failsLocale getDefaultLanguage() throws PersistencyException
PersistencyException
- if DB access failsvoid setDefaultLanguage(Locale defaultLanguage) throws PersistencyException
defaultLanguage
- the new default languagePersistencyException
- if DB access failsUnsupportedLanguageException
- if new default lang is not a supported languageIContentObject getRootContentObject() throws PersistencyException
PersistencyException
- if DB access failsIContentObject findContentObject(String uri) throws PersistencyException
If you want to search locally only, without considering overriding,
then you should use IContentManagementSystem.getContentObject(String)
instead.
uri
- null
if not foundPersistencyException
- if DB access failsIContentObject getContentObject(String uri) throws PersistencyException
If you want to use overriding and include required projects in
the search then you should use IContentManagementSystem.findContentObject(String)
instead. This is normally the intended behavior.
uri
- null
if not foundPersistencyException
- if DB access failsIContentObjectValue findContentObjectValue(String uri, Locale language) throws PersistencyException
Returns the default value of the associated content object, if no value with the given language exists for the given content object.
uri
- language
- optional, if null
: return default valuenull
if associated content object does not exist or has no valuesPersistencyException
- if DB access failsIContentObjectValue getContentObjectValue(String uri, Locale language) throws PersistencyException
If you want to use overriding and include required projects in
the search then you should use IContentManagementSystem.findContentObjectValue(String, Locale)
instead. This is normally the intended behavior.
Returns the default value of the associated content object, if no value with the given language exists for the given content object.
uri
- language
- optional, if null
: return default valuenull
if associated content object does not exist or has no valuesPersistencyException
- if DB access failsString co(String uri)
Returns the value of the ContentObject at the given URI in the currently active language. The value is rendered as a String, according to the context and to the type of the value. The result is dependent on the availability of renderers in the current context and may be the empty String if the value could not be rendered correcly.
The search scope is the current case's project or - if not available - this cms'es project and all of it's required projects. If the given uri can not be resolved then the empty String will be returned.
This method never returns null.
uri
- the uri of the ContentObject to retrieveString co(String uri, List<Object> formatObjects)
Returns the value of the ContentObject at the given URI in the currently active language. The value is
rendered as a String, according to the context and to the type of the value. The placeholders ({0}, {1},
etc.) in the content object value will be replaced by the specified formatObjects
. The
result is dependent on the availability of renderers in the current context and may be the empty String
if the value could not be rendered correcly.
The search scope is the current case's project or - if not available - this cms'es project and all of it's required projects. If the given uri can not be resolved then the empty String will be returned.
This method never returns null.
uri
- the uri of the ContentObject to retrieveformatObjects
- The objects that will be used to replace the placeholders in the content object
value. E.g. {0} will be replaced by the first object in the specified list, {1} with the second
object and so on.String coLocale(String uri, Locale locale)
Returns the value of the ContentObject in the given language. The value is rendered as a String, according to the context and to the type of the value. The result is dependent on the availability of renderers in the current context and may be the empty String if the value could not be rendered correctly.
The search scope is the current case's project or - if not available - this cms'es project and all of it's required projects. If the given uri can not be resolved then the empty String will be returned.
This method returns never null
.
uri
- the uri of the ContentObject to retrievelocale
- the preferred language for the valueString coLocale(String uri, String locale)
Returns the value of the ContentObject in the given language. The value is rendered as a String, according to the context and to the type of the value. The result is dependent on the availability of renderers in the current context and may be the empty String if the value could not be rendered correctly.
The search scope is the current case's project or - if not available - this cms'es project and all of it's required projects. If the given uri can not be resolved then the empty String will be returned.
This method returns never null
.
uri
- the uri of the ContentObject to retrievelocale
- the preferred language for the value. E.g. 'de_DE', 'de_CH', 'fr' or 'en'.String cr(String uri)
Returns a link to the content object with the given uri. The format and protocol of the returned link is dependent on the current context.
If the given uri could not be resolved in this content management system, then all cms'es from required projects will be queried. If the given uri still isn't found then the empty String will be returned.
This method never returns null.
uri
- the uri of the content object to get a reference ofCopyright © 2024
AXON IVY AG
All Rights Reserved Documentation was generated
on April 28, 2024