Interface ComponentInstanceRoutingMap

  • All Known Implementing Classes:
    AbstractCalendarInstanceRoutingMap, AbstractComponentInstanceRoutingMap, UserCalendarInstanceRoutingMap

    public interface ComponentInstanceRoutingMap
    It provides different URL or URI in order to access component resource views or data.

    Each component, by this interface, is able to indicates to core services how to access a view or a resource.

    An implementation by default is provided. This implementation is based upon the generic mechanism in Silverpeas to build an URL or an URI of a view or resource managed by a component instance (or an application instance).

    Any application requiring to provide a specific rule for URL or URI to core services (indexation for example) has to implement this interface and the implementation has to be qualified with the Named annotation by a name satisfying the following convention [COMPONENT NAME]InstanceRoutingMap. For example, for an application Kmelia, the implementation must be qualified with @Named("kmeliaInstanceRoutingMap")

    Be carefully about that an implementation of this interface must never be a singleton or application scoped! The implementation should be annotated with both Technical and Bean qualifiers.

    This API uses the request cache service in order to improve performances.

    Author:
    silveryocha
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static String NAME_SUFFIX
      The predefined suffix that must compound the name of each implementation of this interface.
    • Field Detail

      • NAME_SUFFIX

        static final String NAME_SUFFIX
        The predefined suffix that must compound the name of each implementation of this interface. An implementation of this interface by a Silverpeas application named Kmelia must be named kmelia[NAME_SUFFIX] where NAME_SUFFIX is the predefined suffix as defined below.
        See Also:
        Constant Field Values
    • Method Detail

      • getInstanceId

        String getInstanceId()
        Gets the identifier of the component instance which the current implementation is linked to.
        Returns:
        an identifier of component instance as string.
      • getHomePage

        URI getHomePage()
        Gets the home page URI of the component instance.
        Returns:
        an URI instance.
      • getViewPage

        URI getViewPage​(ContributionIdentifier contributionIdentifier)
        Gets the view page URI of a resource handled by the component instance and represented by the given contribution identifier.
        Parameters:
        contributionIdentifier - a contribution identifier.
        Returns:
        an URI instance.
      • getPermalink

        URI getPermalink​(ContributionIdentifier contributionIdentifier)
        Gets the permalink URI of a resource handled by the component instance and represented by the given contribution identifier.
        Parameters:
        contributionIdentifier - a contribution identifier.
        Returns:
        an URI instance.
      • getEditionPage

        URI getEditionPage​(ContributionIdentifier contributionIdentifier)
        Gets the edition page URI of a resource handled by the component instance and represented by the given contribution identifier.
        Parameters:
        contributionIdentifier - a contribution identifier.
        Returns:
        an URI instance.
      • getWebResourceUriBuilder

        javax.ws.rs.core.UriBuilder getWebResourceUriBuilder()
        Gets the URI builder of WEB resource provided by the component instance.
        Returns:
        a UriBuilder instance.