lumis.content.core
Class ContentLocale

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

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

Contains the content information for a specific locale. There must be at least one ContentVersion in each instance of this class.

Since:
4.2.0
See Also:
Serialized Form

Constructor Summary
ContentLocale()
           
 
Method Summary
 ContentComment addComment()
          Adds a new comment.
 ContentVersion addVersion()
          Adds a new version.
 ContentVersion addVersionBasedOnAnother(ContentVersion pBaseVersion)
          Adds a new version, based on an already existing version.
 void delete()
          Deletes this instance from persistence.
 ContentVersion getActiveVersion()
          Returns the active version of the content in this locale.
 List<ContentComment> getComments()
          Returns the comments for the content in this locale.
 Content getContent()
          Returns the content this object refers to.
 String getCreatedBy()
          Returns the identifier of the principal that created this object.
 Date getCreatedDateTime()
          Returns the creation date-time of this entry.
 String getId()
          Returns the identifier for this object.
 Locale getLocale()
          Returns the locale this object refers to.
 ContentVersion getPublishedVersion()
          Returns the published version of the content in this locale.
 List<ContentVersion> getVersions()
          Returns the versions for the content in this locale.
 void move(Content newContent, Locale newLocale)
          Moves this content locale object to another content or locale value.
 void setCreatedBy(String createdBy)
          Sets the principal that created this object.
 void setCreatedDateTime(Date createdDateTime)
          Returns the date-time this object was created.
 void setPublishedVersion(ContentVersion publishedVersion)
          Sets the published version of the content in this locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentLocale

public ContentLocale()
Method Detail

getId

public String getId()
Returns the identifier for this object.

Returns:
the identifier for this object.
Since:
4.2.0

getCreatedBy

public String getCreatedBy()
Returns the identifier of the principal that created this object.

Returns:
the principal identifier.
Since:
4.2.0

setCreatedBy

public void setCreatedBy(String createdBy)
Sets the principal that created this object.

Parameters:
createdBy - the principal identifier.
Since:
4.2.0

getCreatedDateTime

public Date getCreatedDateTime()
Returns the creation date-time of this entry.

Returns:
the creation date-time of this entry.
Since:
4.2.0

setCreatedDateTime

public void setCreatedDateTime(Date createdDateTime)
Returns the date-time this object was created.

Parameters:
createdDateTime - the date-time this object was created.
Since:
4.2.0

getLocale

public Locale getLocale()
Returns the locale this object refers to.

Returns:
the locale.
Since:
4.2.0

getActiveVersion

public ContentVersion getActiveVersion()
Returns the active version of the content in this locale.

Returns:
the active version of the content in this locale.
Since:
4.2.0

getPublishedVersion

public ContentVersion getPublishedVersion()
Returns the published version of the content in this locale.

Returns:
the published version of the content in this locale.
Since:
4.2.0

setPublishedVersion

public void setPublishedVersion(ContentVersion publishedVersion)
Sets the published version of the content in this locale.

Parameters:
publishedVersion - the published version to set.
Since:
4.2.0

getComments

public List<ContentComment> getComments()
Returns the comments for the content in this locale. The comments are ordered chronologically.

Returns:
the comments for the content in this locale.
Since:
4.2.0

getVersions

public List<ContentVersion> getVersions()
Returns the versions for the content in this locale. The versions are ordered chronologically.

Returns:
the versions for the content in this locale.
Since:
4.2.0
See Also:
addVersion()

getContent

public Content getContent()
Returns the content this object refers to.

Returns:
the content this object refers to.
Since:
4.2.0

addComment

public ContentComment addComment()
Adds a new comment.

Returns:
the comment added.
Since:
4.2.0
See Also:
getComments()

addVersion

public ContentVersion addVersion()
Adds a new version. The version added will be made active.

Returns:
the new version added.
Since:
4.2.0
See Also:
getVersions(), getActiveVersion(), addVersionBasedOnAnother(ContentVersion)

addVersionBasedOnAnother

public ContentVersion addVersionBasedOnAnother(ContentVersion pBaseVersion)
Adds a new version, based on an already existing version. The version added will be made active.

Parameters:
baseVersion - the version that will be used as a base to create the new version to be added.
Returns:
the added version.
Since:
4.2.0
See Also:
addVersion()

delete

public void delete()
            throws PortalException
Deletes this instance from persistence. This will also delete all content versions that belongs to this locale.

Throws:
PortalException
Since:
4.2.0

move

public void move(Content newContent,
                 Locale newLocale)
          throws PortalException
Moves this content locale object to another content or locale value.

Deletes this contentLocale's original content, if it becomes empty after the move is performed. In this case, association references to that content is updated to refer to contentLocale's new content.

Parameters:
newContent - a persisted content, to which this content locale is to be moved to. If null, this content locale will be moved to a new content.
newLocale - the locale to set in this contentLocale.
Throws:
PortalObjectAlreadyExistsException - if this operation would result in a content having more than one contentLocale with the same locale value.
PortalException
Since:
4.2.0


Lumisportal  5.5.0.091130 - Copyright © 2001-2007, Lumis. All Rights Reserved.