@StableMinor(version="12.3", sinceVersion="4.2") public class Content extends Object implements Serializable
Constructor and Description |
---|
Content() |
Modifier and Type | Method and Description |
---|---|
ContentLocale |
addContentLocale(Locale locale)
Adds a new locale specific content object in this content.
|
ContentLocale |
getContentLocale(Locale locale,
boolean fallbackToDefaultLocale)
Returns the locale specific content object, for the given locale,
optionally using the default locale.
|
Collection<ContentLocale> |
getContentLocales()
Returns the locale specific objects of this content.
|
Locale |
getDefaultLocale()
Returns the default locale for this content.
|
String |
getId()
Returns this content's identifier.
|
String |
getServiceInstanceId()
Returns the identifier of the service instance this content belongs to.
|
String |
getSourceId()
Returns the source this content belongs to.
|
void |
setDefaultLocale(Locale defaultLocale)
Sets the default locale for this content.
|
void |
setServiceInstanceId(String serviceInstanceId)
Sets the service instance this content belongs to.
|
void |
setSourceId(String sourceId)
Sets the source this content belongs to.
|
public String getId()
public String getServiceInstanceId()
public void setServiceInstanceId(String serviceInstanceId)
serviceInstanceId
- the service instance identifier.public String getSourceId()
sourceId
- the source identifier.public void setSourceId(String sourceId)
sourceId
- the source identifier.public Locale getDefaultLocale()
null
if
this content has no default locale.public void setDefaultLocale(Locale defaultLocale)
defaultLocale
- the locale to set. May be null
to set
that this content has no default locale.public Collection<ContentLocale> getContentLocales()
public ContentLocale addContentLocale(Locale locale) throws PortalException
locale
- the locale.PortalObjectAlreadyExistsException
- if this content already
contains an object for the given locale.PortalException
public ContentLocale getContentLocale(Locale locale, boolean fallbackToDefaultLocale)
locale
- the locale.fallbackToDefaultLocale
- if true, the default locale for this content
will be used if no contentLocale for the specified locale exists.null
if
no object exists, according to the given parameters.LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.