Class ThingSearchCommandAdapter

  • All Implemented Interfaces:
    Adapter<org.eclipse.ditto.signals.commands.thingsearch.ThingSearchCommand<?>>

    public class ThingSearchCommandAdapter
    extends AbstractAdapter<T>
    Adapter for mapping a ThingSearchCommand to and from an Adaptable.
    Since:
    1.2.0
    • Method Detail

      • of

        public static ThingSearchCommandAdapter of​(HeaderTranslator headerTranslator)
        Returns a new ThingSearchCommandAdapter.
        Parameters:
        headerTranslator - translator between external and Ditto headers.
        Returns:
        the adapter.
      • mapSignalToAdaptable

        public Adaptable mapSignalToAdaptable​(org.eclipse.ditto.signals.commands.thingsearch.ThingSearchCommand<?> command,
                                              TopicPath.Channel channel)
        Description copied from class: AbstractAdapter
        Subclasses must implement the method to map from the given Signal to an Adaptable.
        Specified by:
        mapSignalToAdaptable in class AbstractAdapter<org.eclipse.ditto.signals.commands.thingsearch.ThingSearchCommand<?>>
        Parameters:
        command - the signal to map.
        channel - the channel to which the signal belongs.
        Returns:
        the mapped Adaptable
      • getType

        protected String getType​(Adaptable adaptable)
        Description copied from class: AbstractAdapter
        Determine the type from Adaptable (default implementation, subclasses may overwrite this method).
        Overrides:
        getType in class AbstractAdapter<org.eclipse.ditto.signals.commands.thingsearch.ThingSearchCommand<?>>
        Parameters:
        adaptable - the processed adaptable
        Returns:
        the type of the adaptable
      • getCriteria

        public Set<TopicPath.Criterion> getCriteria()
        Description copied from interface: Adapter
        Retrieve the set of criteria supported by this adapter.
        Returns:
        the supported criteria.
      • getActions

        public Set<TopicPath.Action> getActions()
        Description copied from interface: Adapter
        Retrieve the set of actions supported by this adapter.
        Returns:
        the set of actions.
      • isForResponses

        public boolean isForResponses()
        Description copied from interface: Adapter
        Retrieve whether this adapter is for responses.
        Returns:
        whether this adapter is for responses.
      • getSearchActions

        public Set<TopicPath.SearchAction> getSearchActions()
        Description copied from interface: Adapter
        Return the set of search actions supported by this adapter. It is the empty set by default.
        Returns:
        the collection of supported search actions.
      • getGroups

        public default Set<TopicPath.Group> getGroups()
        Description copied from interface: Adapter
        Retrieve the set of groups supported by this adapter.
        Specified by:
        getGroups in interface Adapter<T extends org.eclipse.ditto.signals.base.Signal<?>>
        Returns:
        the supported groups.
      • getChannels

        public default Set<TopicPath.Channel> getChannels()
        Description copied from interface: Adapter
        Retrieve the set of channels supported by this adapter.
        Specified by:
        getChannels in interface Adapter<T extends org.eclipse.ditto.signals.base.Signal<?>>
        Returns:
        the supported channels.