Interface MediatorService

  • All Known Implementing Classes:
    AbstractMediatorService, SequenceMediatorService, UILessMediatorService

    public interface MediatorService
    This interface provides the base for the mediator OSGi Service and each and every mediator which has a user interface on the Carbon sequence editor has to implement this interface and that implementation has to be registered as an OSGi Service.

    This provides the basic structure of a mediator for the sequence editor framework, and this also enables to add the mediators to the sequence editor user interface dynamically at runtime.

    See Also:
    AbstractMediatorService
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      String getDisplayName()
      This gives the display name for the mediator in the add mediator menu, and this can be any String.
      String getGroupName()
      Gives the mediator categorization in the add mediator menu.
      String getLogicalName()
      This should be equivalent to Mediator.getType() of the mediator.
      Mediator getMediator()
      Retrieves a default new mediator instances of the representing mediator.
      String getTagLocalName()
      This gives the mediator serialization tag local name.
      String getUIFolderName()  
      boolean isAddChildEnabled()
      Whether this particular mediator can have children? Example of this usage is filter FilterMediator it cannot have children except for the then and else mediators.
      boolean isAddSiblingEnabled()
      Whether this particular mediator can have siblings? Example of this usage is then child of the FilterMediator cannot have mediator siblings.
      boolean isEditable()
      If the mediator has editable configurations this method should return true.
      boolean isMovingAllowed()
      Is it possible to move this mediator in the sequence tree? Example of this usage is default child of a SwitchMediator it cannot be moved, there is no meaning of movement for the default
      boolean isSequenceRefreshRequired()
      Some mediator updates require a refresh in the sequence editor.
    • Method Detail

      • getTagLocalName

        String getTagLocalName()
        This gives the mediator serialization tag local name. Example: if you take the LogMediator derived from the LogMediatorSerializer the tag local name is log
        Returns:
        tag local name of the mediator tag QName
      • getDisplayName

        String getDisplayName()
        This gives the display name for the mediator in the add mediator menu, and this can be any String. It is recommended to put a meaning full descriptive short name as the display name
        Returns:
        display name in the add mediator menu of the mediator
      • getLogicalName

        String getLogicalName()
        This should be equivalent to Mediator.getType() of the mediator. The value of this is generally the class name without the package declaration. Example: logical name of the LogMediator is LogMediator
        Returns:
        logical name of the mediator
      • getGroupName

        String getGroupName()
        Gives the mediator categorization in the add mediator menu. This should be a descriptive meaning full and short text and it is recommended to use existing group names if possible, to reduce the number of groups in the add mediator menu.

        Defined group names are:

        • Core
        • Extension
        • Filter
        • Transform
        • Advanced
          • Of course it is possible to add a new group by putting any String to this.
        Returns:
        group name of the mediator to which this mediator is categorized in the add mediator menu
      • getUIFolderName

        String getUIFolderName()
      • isAddSiblingEnabled

        boolean isAddSiblingEnabled()
        Whether this particular mediator can have siblings? Example of this usage is then child of the FilterMediator cannot have mediator siblings.

        This can also be used to enforce logical constraints like the DropMediator, it is not logically effective to have siblings after the drop

        Returns:
        true if the particular mediator can have siblings
      • isAddChildEnabled

        boolean isAddChildEnabled()
        Whether this particular mediator can have children? Example of this usage is filter FilterMediator it cannot have children except for the then and else mediators.
        Returns:
        true if the particular mediator can have children
      • isMovingAllowed

        boolean isMovingAllowed()
        Is it possible to move this mediator in the sequence tree? Example of this usage is default child of a SwitchMediator it cannot be moved, there is no meaning of movement for the default
        Returns:
        true if the particular mediator is allowed to move over
      • isEditable

        boolean isEditable()
        If the mediator has editable configurations this method should return true. For example mediators like InMediator cannot be updated.
        Returns:
        true if the mediator is editable
      • getMediator

        Mediator getMediator()
        Retrieves a default new mediator instances of the representing mediator. This method is used by the mediator addition and will be called to get a new instance of the mediator.

        It is recommended to fill the required fields of the mediator with the default values if possible before returning the new instance, so that the user can just save this mediator if he/she is not smart.

        Returns:
        new instance of the mediator with the default values filled
      • isSequenceRefreshRequired

        boolean isSequenceRefreshRequired()
        Some mediator updates require a refresh in the sequence editor. i.e ThrottleMediator. If the mediator update requires a update in the sequence editor this method should return true.
        Returns:
        if mediator update requires a sequence editor refresh