Class ThingSearchCommandAdapter
- java.lang.Object
-
- org.eclipse.ditto.protocoladapter.AbstractAdapter<T>
-
- org.eclipse.ditto.protocoladapter.things.ThingSearchCommandAdapter
-
- All Implemented Interfaces:
Adapter<org.eclipse.ditto.signals.commands.thingsearch.ThingSearchCommand<?>>
public class ThingSearchCommandAdapter extends AbstractAdapter<T>
Adapter for mapping aThingSearchCommand
to and from anAdaptable
.- Since:
- 1.2.0
-
-
Field Summary
-
Fields inherited from class org.eclipse.ditto.protocoladapter.AbstractAdapter
payloadPathMatcher, RESPONSES_CRITERION
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Default Methods Modifier and Type Method Description Set<TopicPath.Action>
getActions()
Retrieve the set of actions supported by this adapter.default Set<TopicPath.Channel>
getChannels()
Retrieve the set of channels supported by this adapter.Set<TopicPath.Criterion>
getCriteria()
Retrieve the set of criteria supported by this adapter.default Set<TopicPath.Group>
getGroups()
Retrieve the set of groups supported by this adapter.Set<TopicPath.SearchAction>
getSearchActions()
Return the set of search actions supported by this adapter.protected String
getType(Adaptable adaptable)
Determine the type fromAdaptable
(default implementation, subclasses may overwrite this method).boolean
isForResponses()
Retrieve whether this adapter is for responses.Adaptable
mapSignalToAdaptable(org.eclipse.ditto.signals.commands.thingsearch.ThingSearchCommand<?> command, TopicPath.Channel channel)
Subclasses must implement the method to map from the givenSignal
to anAdaptable
.static ThingSearchCommandAdapter
of(HeaderTranslator headerTranslator)
Returns a new ThingSearchCommandAdapter.-
Methods inherited from class org.eclipse.ditto.protocoladapter.AbstractAdapter
dittoHeadersFrom, filterOutUnknownExternalHeaders, fromAdaptable, getAction, getTypeCriterionAsString, headerTranslator, toAdaptable, upperCaseFirst
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.ditto.protocoladapter.Adapter
fromAdaptable, requiresSubject, toAdaptable, toAdaptable
-
-
-
-
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 givenSignal
to anAdaptable
.- Specified by:
mapSignalToAdaptable
in classAbstractAdapter<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 fromAdaptable
(default implementation, subclasses may overwrite this method).- Overrides:
getType
in classAbstractAdapter<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.
-
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 interfaceAdapter<T extends org.eclipse.ditto.signals.base.Signal<?>>
- Returns:
- the supported channels.
-
-