lumis.content.core
Class Content

Package class diagram package Content
java.lang.Object
  extended by lumis.content.core.Content
All Implemented Interfaces:
Serializable

@StableMinor(version="6.2",
             sinceVersion="4.2")
public class Content
extends Object
implements Serializable

A content entity object. A content may have its data specified in multiple locales.

Since:
4.2.0
See Also:
Serialized Form

Constructor Summary
Content()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Content

public Content()
Method Detail

getId

public String getId()
Returns this content's identifier.

Returns:
this content's identifier.
Since:
4.2.0

getServiceInstanceId

public String getServiceInstanceId()
Returns the identifier of the service instance this content belongs to.

Returns:
the identifier of the service instance this content belongs to.
Since:
4.2.0

setServiceInstanceId

public void setServiceInstanceId(String serviceInstanceId)
Sets the service instance this content belongs to.

Parameters:
serviceInstanceId - the service instance identifier.
Since:
4.2.0

getSourceId

public String getSourceId()
Returns the source this content belongs to.

Parameters:
sourceId - the source identifier.
Since:
4.2.0

setSourceId

public void setSourceId(String sourceId)
Sets the source this content belongs to.

Parameters:
sourceId - the source identifier.
Since:
4.2.0

getDefaultLocale

public Locale getDefaultLocale()
Returns the default locale for this content.

Returns:
the default locale for this content, or null if this content has no default locale.
Since:
4.2.0

setDefaultLocale

public void setDefaultLocale(Locale defaultLocale)
Sets the default locale for this content.

Parameters:
defaultLocale - the locale to set. May be null to set that this content has no default locale.
Since:
4.2.0

getContentLocales

public Collection<ContentLocale> getContentLocales()
Returns the locale specific objects of this content.

Returns:
the locale specific objects of this content.
Since:
4.2.0

addContentLocale

public ContentLocale addContentLocale(Locale locale)
                               throws PortalException
Adds a new locale specific content object in this content.

Parameters:
locale - the locale.
Returns:
the locale specific content object created.
Throws:
PortalObjectAlreadyExistsException - if this content already contains an object for the given locale.
PortalException
Since:
4.2.0

getContentLocale

public ContentLocale getContentLocale(Locale locale,
                                      boolean fallbackToDefaultLocale)
Returns the locale specific content object, for the given locale, optionally using the default locale.

Parameters:
locale - the locale.
fallbackToDefaultLocale - if true, the default locale for this content will be used if no contentLocale for the specified locale exists.
Returns:
the locale specific content object, or null if no object exists, according to the given parameters.
Since:
4.2.0


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.