com.silverpeas
Interface SilverpeasComponentService<T extends SilverpeasContent>

Type Parameters:
T - The concrete type of the content the component is dedicated to manage.
All Known Subinterfaces:
CommentService
All Known Implementing Classes:
DefaultCommentService

public interface SilverpeasComponentService<T extends SilverpeasContent>

A service providing the transverse operations related to a given Silverpeas component. A Silverpeas component aims to manage a given type of content and it is based upon some settings and i18n messages. Some capabilities of a Silverpeas component are provided by a service that is a bean with business logic transverse methods; the core business logic of the component should be provided by the resources themselves (see the DDD (Domain Driven Development) approach).


Method Summary
 ResourceLocator getComponentMessages(String language)
          Gets the localized messages defined in this Silverpeas component.
 ResourceLocator getComponentSettings()
          Gets the settings of this Silverpeas component.
 T getContentById(String contentId)
          Gets the content handled by an instance of the component with the specified unique identifier.
 

Method Detail

getContentById

T getContentById(String contentId)
Gets the content handled by an instance of the component with the specified unique identifier.

Parameters:
contentId - the unique identifier of the content to get.
Returns:
a Silverpeas content.

getComponentSettings

ResourceLocator getComponentSettings()
Gets the settings of this Silverpeas component.

Returns:
a ResourceLocator instance giving access the settings.

getComponentMessages

ResourceLocator getComponentMessages(String language)
Gets the localized messages defined in this Silverpeas component.

Parameters:
language - the language in which the messages has to be localized. If empty or null, then the bundle with default messages is returned.
Returns:
a ResourceLocator instance giving access the localized messages.


Copyright © 2016 Silverpeas. All Rights Reserved.