com.silverpeas
Interface SilverpeasContent

All Superinterfaces:
Serializable
All Known Subinterfaces:
SilverpeasToolContent, ValidableContribution
All Known Implementing Classes:
Comment, PublicationDetail, QuestionContainerDetail

public interface SilverpeasContent
extends Serializable

A content managed in the Silverpeas collaborative portal. A content in Silverpeas is resource with a content (that can be empty); for example, a publication in Silverpeas is a content. This interface defines the common properties the different type of content in Silverpeas has to support.


Method Summary
 boolean canBeAccessedBy(UserDetail user)
          Is the specified user can access this content?
 String getComponentInstanceId()
          Gets the unique identifier of the Silverpeas component instance that manages this content.
 String getContributionType()
          Gets the type of this content.
 Date 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.
 String getSilverpeasContentId()
          Gets the unique identifier of this content among all the contents managed in the Silverpeas collaborative portal.
 String getTitle()
          Gets the title of this content if any.
 

Method Detail

getId

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.

Returns:
the identifier of this content.

getComponentInstanceId

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

Returns:
the unique identifier of the component instance in the Silverpeas collaborative portal.

getSilverpeasContentId

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.

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

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

Returns:
the detail about the user that created this content.

getCreationDate

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

Returns:
the date at which this content was created.

getTitle

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

Returns:
the resource title. Can be empty if no title was set or no title is defined for a such content.

getDescription

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

Returns:
the resource description. Can be empty if no description was set or no description is defined for a such content.

getContributionType

String getContributionType()
Gets the type of this content.

Returns:
the resource type. This can be Post, Message, Publication, Survey...

canBeAccessedBy

boolean canBeAccessedBy(UserDetail user)
Is the specified user can access this content? A user can access a content if it has enough rights to access the application instance in which is managed this content. In the case where the application instance distributes its contents among one or more nodes and these nodes have access rights, then the user must have also the rights to access the node to which belongs the content.

Parameters:
user - a user in Silverpeas.
Returns:
true if the user can access this content, false otherwise.


Copyright © 2016 Silverpeas. All Rights Reserved.