Class SudoRetrieveThings
java.lang.Object
org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThings>
org.eclipse.ditto.things.api.commands.sudo.SudoRetrieveThings
- All Implemented Interfaces:
org.eclipse.ditto.base.model.headers.DittoHeadersSettable<SudoRetrieveThings>,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<SudoRetrieveThings>,org.eclipse.ditto.base.model.signals.Signal<SudoRetrieveThings>,org.eclipse.ditto.base.model.signals.WithName,org.eclipse.ditto.base.model.signals.WithResource,org.eclipse.ditto.base.model.signals.WithType,SudoCommand<SudoRetrieveThings>
@Immutable
@AllValuesAreNonnullByDefault
public final class SudoRetrieveThings
extends org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThings>
implements SudoCommand<SudoRetrieveThings>
Command which retrieves several
Things based on the the passed in List of
Thing IDs without authorization. This command is sent only internally by the Ditto services, e.g. eventing or search,
in order to synchronize their Things cache.-
Nested Class Summary
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> Nested classes/interfaces inherited from interface org.eclipse.ditto.things.api.commands.sudo.SudoCommand
SudoCommand.JsonFields -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringName of the "Sudo Retrieve Things" command.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.things.api.commands.sudo.SudoCommand
RESOURCE_TYPE, TYPE_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 SudoRetrieveThingsCreates a newSudoRetrieveThingsfrom a JSON string.static SudoRetrieveThingsfromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThingsfrom a JSON object.org.eclipse.ditto.base.model.signals.commands.Command.CategoryOptional<org.eclipse.ditto.json.JsonFieldSelector>Returns the JSON field selector which is to be included in the JSON of each retrieved Thing.List<org.eclipse.ditto.things.model.ThingId>Returns the IDs of the Things to be retrieved by this command.inthashCode()static SudoRetrieveThingsof(List<org.eclipse.ditto.things.model.ThingId> thingIds, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThings.static SudoRetrieveThingsof(List<org.eclipse.ditto.things.model.ThingId> thingIds, org.eclipse.ditto.json.JsonFieldSelector selectedFields, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThings.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, toJson, 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
getNameMethods inherited from interface org.eclipse.ditto.things.api.commands.sudo.SudoCommand
getResourcePath, getResourceType, getTypePrefixMethods inherited from interface org.eclipse.ditto.base.model.headers.WithDittoHeaders
getDittoHeadersMethods inherited from interface org.eclipse.ditto.base.model.headers.WithManifest
getManifestMethods inherited from interface org.eclipse.ditto.base.model.signals.WithType
getType
-
Field Details
-
NAME
Name of the "Sudo Retrieve Things" command.- See Also:
-
TYPE
Type of this command.- See Also:
-
-
Method Details
-
of
public static SudoRetrieveThings of(List<org.eclipse.ditto.things.model.ThingId> thingIds, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThings.- Parameters:
thingIds- one or more Thing IDs to be retrieved.dittoHeaders- the command headers of the request.- Returns:
- a command for retrieving Things without authorization.
- Throws:
NullPointerException- if any argument isnull.
-
of
public static SudoRetrieveThings of(List<org.eclipse.ditto.things.model.ThingId> thingIds, @Nullable org.eclipse.ditto.json.JsonFieldSelector selectedFields, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThings.- Parameters:
thingIds- one or more Thing IDs to be retrieved.selectedFields- the Fields which should be included in the Thing's JSON representation.dittoHeaders- the command headers of the request.- Returns:
- a command for retrieving Things without authorization.
- Throws:
NullPointerException- if any argument butselectedFieldsisnull.
-
fromJson
public static SudoRetrieveThings fromJson(String jsonString, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThingsfrom a JSON string.- Parameters:
jsonString- the JSON string of which a new SudoRetrieveThings is to be created.dittoHeaders- the optional command headers of the request.- Returns:
- the SudoRetrieveThings which was created from the given JSON string.
- Throws:
NullPointerException- ifjsonStringisnull.IllegalArgumentException- ifjsonStringis empty.org.eclipse.ditto.json.JsonParseException- if the passed injsonStringdoes not contain a JSON object or if it is not valid JSON.org.eclipse.ditto.json.JsonMissingFieldException- if the passed injsonStringwas not in the expected format.
-
fromJson
public static SudoRetrieveThings fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThingsfrom a JSON object.- Parameters:
jsonObject- the JSON string of which a new SudoRetrieveThings is to be created.dittoHeaders- the optional command headers of the request.- Returns:
- the SudoRetrieveThings which was created from the given JSON object.
- Throws:
NullPointerException- ifjsonObjectisnull.org.eclipse.ditto.json.JsonMissingFieldException- if the passed injsonObjectwas not in the expected format.
-
getThingIds
Returns the IDs of the Things to be retrieved by this command.- Returns:
- a sorted unmodifiable list containing the IDs of Things to be retrieved by this command (in order how they were requested).
-
getSelectedFields
Returns the JSON field selector which is to be included in the JSON of each retrieved Thing.- Returns:
- the JSON field selector if specified.
-
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<SudoRetrieveThings>
-
getCategory
public org.eclipse.ditto.base.model.signals.commands.Command.Category getCategory()- Specified by:
getCategoryin interfaceorg.eclipse.ditto.base.model.signals.commands.Command<SudoRetrieveThings>
-
setDittoHeaders
public SudoRetrieveThings setDittoHeaders(org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) - Specified by:
setDittoHeadersin interfaceorg.eclipse.ditto.base.model.signals.commands.Command<SudoRetrieveThings>- Specified by:
setDittoHeadersin interfaceorg.eclipse.ditto.base.model.headers.DittoHeadersSettable<SudoRetrieveThings>- Specified by:
setDittoHeadersin interfaceSudoCommand<SudoRetrieveThings>
-
hashCode
public int hashCode()- Overrides:
hashCodein classorg.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThings>
-
equals
- Overrides:
equalsin classorg.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThings>
-
canEqual
- Overrides:
canEqualin classorg.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThings>
-
toString
- Overrides:
toStringin classorg.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThings>
-