Interface Service

All Superinterfaces:
Labelable, Model, ModelItemAccessor, ModelItemContainer
All Known Implementing Classes:
AttachmentsService, CalendarSearchService, ExplorerFolderService, FilteredContentsService, FilteredPagesService, LinkDirectoryService, SearchPagesService, SearchService, ServerDirectoryService, SitemapService, StaticService, SyndicationService

public interface Service extends Model, Labelable
Interface representing a business service.
A service is identified by a name and a Cocoon-URL.
This URL correspond to a pipeline called by a page template.
URL must be relative to the sitemap of the service.
  • Method Details

    • getPluginName

      Returns the plugin's name.
      Returns:
      the plugin's name.
    • getCategory

      Retrieves the category of the service.
      Returns:
      the category.
    • getIconGlyph

      Retrieves the CSS class to use for glyph icon
      Returns:
      the glyph name.
    • getIconDecorator

      Retrieves the CSS class to use for decorator above the main icon
      Returns:
      the glyph name.
    • getSmallIcon

      Retrieves the URL of the icon without the context path.
      Returns:
      the icon URL for the small image 16x16.
    • getMediumIcon

      Retrieves the URL of the icon without the context path.
      Returns:
      the icon URL for the medium image 32x32.
    • getLargeIcon

      Retrieves the URL of the icon without the context path.
      Returns:
      the icon URL for the large image 48x48.
    • getCreationBoxHeight

      Gets the height of the creation dialog box.
      Returns:
      the height of the creation dialog box
    • getCreationBoxWidth

      Gets the width of the creation dialog box.
      Returns:
      the width of the creation dialog box
    • getCSSFiles

      Returns the list of CSS files needed to correctly display the service's in BO, such as the service's icon
      Returns:
      The list of CSS files needed. Must not be null.
    • getURL

      Returns the service's Cocoon-URL.
      Returns:
      the service's Cocoon-URL.
    • getParameters

      Retrieves the service's parameters definitions
      Returns:
      the service's parameters definitions
    • getView

      Retrieves the service's view
      Returns:
      the service's view
    • getParametersScript

      This method return the script that will be used to display parameters field.
      Returns:
      The script. Can be null.
    • isPrivate

      boolean isPrivate()
      Get whether the service is private, i.e. should not be created by the regular service interface.
      Returns:
      true if the service is private, false if it is public.
    • getRight

      Get the right needed to create an instance of this service.
      Returns:
      the right needed to create an instance of this service. If null is returned, no right is needed.
    • isCacheable

      boolean isCacheable(Page currentPage, ZoneItem zoneItem)
      Returns true if the result of this service may be cached, depending on the ZoneItem containing an instance of this service.
      Parameters:
      currentPage - the current Page containing the service.
      zoneItem - the ZoneItem containing an instance of this service.
      N.B: The ZoneItem can belong to a page that is not the current page, when it is inherited.
      Returns:
      true if the result of this service may be cached.
    • index

      void index(ZoneItem zoneItem, org.apache.solr.common.SolrInputDocument document)
      Fill the index with service data.
      This method is called during the containing page indexation process.
      Parameters:
      zoneItem - the ZoneItem containing an instance of this service.
      document - the solr document for the containing Page.
    • getFamilyId

      default String getFamilyId()
      Description copied from interface: Model
      Retrieves the Family Id (for example the extension point) Each model Id have to be unique in it's family Id
      Specified by:
      getFamilyId in interface Model
      Returns:
      content point (for example "org.ametys.cms.contenttype.ContentTypeExtensionPoint" for a content)