Class RetrieveThings
java.lang.Object
org.eclipse.ditto.base.model.signals.commands.AbstractCommand<RetrieveThings>
org.eclipse.ditto.things.model.signals.commands.query.RetrieveThings
- All Implemented Interfaces:
org.eclipse.ditto.base.model.headers.DittoHeadersSettable<RetrieveThings>,org.eclipse.ditto.base.model.headers.WithDittoHeaders,org.eclipse.ditto.base.model.headers.WithManifest,org.eclipse.ditto.base.model.json.Jsonifiable<org.eclipse.ditto.json.JsonObject>,org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate<org.eclipse.ditto.json.JsonObject,,org.eclipse.ditto.json.JsonField> org.eclipse.ditto.base.model.signals.commands.Command<RetrieveThings>,org.eclipse.ditto.base.model.signals.commands.WithNamespace,org.eclipse.ditto.base.model.signals.commands.WithSelectedFields,org.eclipse.ditto.base.model.signals.Signal<RetrieveThings>,org.eclipse.ditto.base.model.signals.WithName,org.eclipse.ditto.base.model.signals.WithResource,org.eclipse.ditto.base.model.signals.WithType
@Immutable
public final class RetrieveThings
extends org.eclipse.ditto.base.model.signals.commands.AbstractCommand<RetrieveThings>
implements org.eclipse.ditto.base.model.signals.commands.WithNamespace, org.eclipse.ditto.base.model.signals.commands.WithSelectedFields
Command which retrieves several
Things based on the the passed in List of
Thing IDs.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder to facilitate creation ofRetrieveThingsinstances.Nested classes/interfaces inherited from interface org.eclipse.ditto.base.model.signals.commands.Command
org.eclipse.ditto.base.model.signals.commands.Command.Category, org.eclipse.ditto.base.model.signals.commands.Command.JsonFieldsNested classes/interfaces inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable
org.eclipse.ditto.base.model.json.Jsonifiable.WithFieldSelector, org.eclipse.ditto.base.model.json.Jsonifiable.WithFieldSelectorAndPredicate<T extends Object>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPointer<J extends org.eclipse.ditto.json.JsonValue>, org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate<J extends org.eclipse.ditto.json.JsonValue,T extends Object> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.eclipse.ditto.json.JsonFieldDefinition<org.eclipse.ditto.json.JsonArray>static final StringName of the "Retrieve Things" command.static final StringThing resource type.static final StringType of this command.Fields inherited from interface org.eclipse.ditto.base.model.signals.commands.Command
TYPE_QUALIFIERFields inherited from interface org.eclipse.ditto.base.model.signals.Signal
CHANNEL_LIVE, CHANNEL_TWINFields inherited from interface org.eclipse.ditto.base.model.signals.WithType
MESSAGES_COMMAND_RESPONSES_PREFIX, MESSAGES_COMMANDS_PREFIX, POLICY_ANNOUNCEMENT_PREFIX, THINGS_COMMAND_RESPONSES_PREFIX, THINGS_COMMANDS_PREFIX, THINGS_EVENTS_PREFIX -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendPayload(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder, org.eclipse.ditto.base.model.json.JsonSchemaVersion schemaVersion, Predicate<org.eclipse.ditto.json.JsonField> thePredicate) protected booleanbooleanstatic RetrieveThingsCreates a newRetrieveThingsfrom a JSON string.static RetrieveThingsfromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newRetrieveThingsfrom a JSON object.static RetrieveThings.BuildergetBuilder(List<ThingId> thingIds) Returns a builder for a command for retrieving the Things.static RetrieveThings.BuildergetBuilder(RetrieveThings retrieveThings) Returns a builder for a command for retrieving Things.static RetrieveThings.BuildergetBuilder(ThingId... thingIds) Returns a builder for a command for retrieving the Things.org.eclipse.ditto.base.model.signals.commands.Command.CategoryReturns an unmodifiable unsorted List of the identifiers of theThings to be retrieved.org.eclipse.ditto.json.JsonPointerOptional<org.eclipse.ditto.json.JsonFieldSelector>inthashCode()setDittoHeaders(org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) toString()Methods inherited from class org.eclipse.ditto.base.model.signals.commands.AbstractCommand
getDittoHeaders, getManifest, getType, toJsonMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.eclipse.ditto.base.model.signals.commands.Command
getImplementedSchemaVersion, toJsonMethods inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable
getLatestSchemaVersion, getSupportedSchemaVersions, implementsSchemaVersion, implementsSchemaVersion, toJsonStringMethods inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate
toJson, toJsonString, toJsonStringMethods inherited from interface org.eclipse.ditto.base.model.signals.Signal
getName
-
Field Details
-
NAME
Name of the "Retrieve Things" command.- See Also:
-
RESOURCE_TYPE
Thing resource type. -
TYPE
Type of this command.- See Also:
-
JSON_THING_IDS
public static final org.eclipse.ditto.json.JsonFieldDefinition<org.eclipse.ditto.json.JsonArray> JSON_THING_IDS
-
-
Method Details
-
getBuilder
Returns a builder for a command for retrieving the Things.- Parameters:
thingIds- one or more Thing IDs to be retrieved.- Returns:
- a builder for a Thing retrieving command.
- Throws:
NullPointerException- ifthingIdsisnull.
-
getBuilder
Returns a builder for a command for retrieving the Things.- Parameters:
thingIds- the Thing IDs to be retrieved.- Returns:
- a builder for a Thing retrieving command.
- Throws:
NullPointerException- ifthingIdsisnull.
-
getBuilder
Returns a builder for a command for retrieving Things. The builder gets initialised with the data from the specified RetrieveThings.- Parameters:
retrieveThings- aRetrieveThingsobject which acts as template for the new builder.- Returns:
- a builder for a Thing retrieving command.
-
fromJson
public static RetrieveThings fromJson(String jsonString, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newRetrieveThingsfrom a JSON string.- Parameters:
jsonString- the JSON string of which the command is to be created.dittoHeaders- the headers of the command.- Returns:
- the command.
- Throws:
NullPointerException- ifjsonStringisnull.IllegalArgumentException- ifjsonStringis empty.org.eclipse.ditto.json.JsonParseException- if the passed injsonStringwas not in the expected format.
-
fromJson
public static RetrieveThings fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newRetrieveThingsfrom a JSON object.- Parameters:
jsonObject- the JSON object of which the command is to be created.dittoHeaders- the headers of the command.- Returns:
- the command.
- Throws:
NullPointerException- ifjsonObjectisnull.org.eclipse.ditto.json.JsonParseException- if the passed injsonObjectwas not in the expected format.
-
getEntityIds
Returns an unmodifiable unsorted List of the identifiers of theThings to be retrieved.- Returns:
- the identifiers of the Things.
-
getNamespace
- Specified by:
getNamespacein interfaceorg.eclipse.ditto.base.model.signals.commands.WithNamespace
-
getSelectedFields
- Specified by:
getSelectedFieldsin interfaceorg.eclipse.ditto.base.model.signals.commands.WithSelectedFields
-
getResourcePath
public org.eclipse.ditto.json.JsonPointer getResourcePath()- Specified by:
getResourcePathin interfaceorg.eclipse.ditto.base.model.signals.WithResource
-
getResourceType
- Specified by:
getResourceTypein interfaceorg.eclipse.ditto.base.model.signals.WithResource
-
appendPayload
protected void appendPayload(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder, org.eclipse.ditto.base.model.json.JsonSchemaVersion schemaVersion, Predicate<org.eclipse.ditto.json.JsonField> thePredicate) - Specified by:
appendPayloadin classorg.eclipse.ditto.base.model.signals.commands.AbstractCommand<RetrieveThings>
-
getTypePrefix
- Specified by:
getTypePrefixin interfaceorg.eclipse.ditto.base.model.signals.commands.Command<RetrieveThings>
-
getCategory
public org.eclipse.ditto.base.model.signals.commands.Command.Category getCategory()- Specified by:
getCategoryin interfaceorg.eclipse.ditto.base.model.signals.commands.Command<RetrieveThings>
-
setDittoHeaders
public RetrieveThings setDittoHeaders(org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) - Specified by:
setDittoHeadersin interfaceorg.eclipse.ditto.base.model.signals.commands.Command<RetrieveThings>- Specified by:
setDittoHeadersin interfaceorg.eclipse.ditto.base.model.headers.DittoHeadersSettable<RetrieveThings>
-
hashCode
public int hashCode()- Overrides:
hashCodein classorg.eclipse.ditto.base.model.signals.commands.AbstractCommand<RetrieveThings>
-
equals
- Overrides:
equalsin classorg.eclipse.ditto.base.model.signals.commands.AbstractCommand<RetrieveThings>
-
canEqual
- Overrides:
canEqualin classorg.eclipse.ditto.base.model.signals.commands.AbstractCommand<RetrieveThings>
-
toString
- Overrides:
toStringin classorg.eclipse.ditto.base.model.signals.commands.AbstractCommand<RetrieveThings>
-