com.silverpeas.util.security
Class TextContent

java.lang.Object
  extended by com.silverpeas.util.security.TextContent
All Implemented Interfaces:
SilverpeasContent, Serializable

public class TextContent
extends Object
implements SilverpeasContent

A content of text to use in the tests on the content encryption.

See Also:
Serialized Form

Nested Class Summary
static class TextContent.Properties
           
 
Constructor Summary
TextContent(String id, String componentInstanceId, UserDetail author)
           
 
Method Summary
 boolean canBeAccessedBy(UserDetail user)
           
 String getComponentInstanceId()
          Gets the unique identifier of the Silverpeas component instance that manages this content.
 String getContributionType()
          Gets the type of this content.
 DateTime getCreationDate()
          Gets the date at which this content was created.
 UserDetail getCreator()
          Gets the author that has created this content.
 String getDescription()
          Gets the description of this content if any.
 String getId()
          Gets the identifier of this content in the Silverpeas component providing it.
 Map<String,String> getProperties()
           
 String getSilverpeasContentId()
          Gets the unique identifier of this content among all the contents managed in the Silverpeas collaborative portal.
 String getText()
           
 String getTitle()
          Gets the title of this content if any.
 void setDescription(String description)
           
 void setText(String text)
           
 void setTitle(String title)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextContent

public TextContent(String id,
                   String componentInstanceId,
                   UserDetail author)
Method Detail

getId

public String getId()
Gets the identifier of this content in the Silverpeas component providing it. This identifier is only unique among all of the contents managed by the same component (whatever its different instances). As each type of contents in Silverpeas is provided by a single Silverpeas component, the identifier of a content is then specific to the component it belongs to. It is a way for an instance of a such component to identify uniquely the different contents it manages. So, each component can have their own policy to identify their content, whatever the way they are identified in Silverpeas.

Specified by:
getId in interface SilverpeasContent
Returns:
the identifier of this content.

getComponentInstanceId

public String getComponentInstanceId()
Gets the unique identifier of the Silverpeas component instance that manages this content.

Specified by:
getComponentInstanceId in interface SilverpeasContent
Returns:
the unique identifier of the component instance in the Silverpeas collaborative portal.

getSilverpeasContentId

public String getSilverpeasContentId()
Gets the unique identifier of this content among all the contents managed in the Silverpeas collaborative portal. It is the alone unique identifier of a content in the whole Silverpeas portal and it is refered as the Silverpeas content identifier or the silver content identifier. For each content put into the Silverpeas collaborative portal, an entry is uniquely created in the whole system so that is can be refered by transversal services and by component instances others the one that manages it. For compatibility reason, the Silverpeas content identifier of contents that are no yet taken into account in the whole system isn't defined, so an empty string is then returned.

Specified by:
getSilverpeasContentId in interface SilverpeasContent
Returns:
the unique identifier of this content in the whole Silverpeas collaborative portal. Can be empty if no such identifier is defined for the type of this content.

getCreator

public UserDetail getCreator()
Gets the author that has created this content.

Specified by:
getCreator in interface SilverpeasContent
Returns:
the detail about the user that created this content.

getCreationDate

public DateTime getCreationDate()
Gets the date at which this content was created.

Specified by:
getCreationDate in interface SilverpeasContent
Returns:
the date at which this content was created.

getTitle

public String getTitle()
Gets the title of this content if any.

Specified by:
getTitle in interface SilverpeasContent
Returns:
the resource title. Can be empty if no title was set or no title is defined for a such content.

getDescription

public String getDescription()
Gets the description of this content if any.

Specified by:
getDescription in interface SilverpeasContent
Returns:
the resource description. Can be empty if no description was set or no description is defined for a such content.

getContributionType

public String getContributionType()
Gets the type of this content.

Specified by:
getContributionType in interface SilverpeasContent
Returns:
the resource type. This can be Post, Message, Publication, Survey...

canBeAccessedBy

public boolean canBeAccessedBy(UserDetail user)
Specified by:
canBeAccessedBy in interface SilverpeasContent

setTitle

public void setTitle(String title)

setDescription

public void setDescription(String description)

setText

public void setText(String text)

getText

public String getText()

getProperties

public Map<String,String> getProperties()


Copyright © 2016 Silverpeas. All Rights Reserved.