Class SudoRetrieveThing
java.lang.Object
org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThing>
org.eclipse.ditto.things.api.commands.sudo.SudoRetrieveThing
- All Implemented Interfaces:
org.eclipse.ditto.base.model.entity.id.WithEntityId,org.eclipse.ditto.base.model.headers.DittoHeadersSettable<SudoRetrieveThing>,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<SudoRetrieveThing>,org.eclipse.ditto.base.model.signals.Signal<SudoRetrieveThing>,org.eclipse.ditto.base.model.signals.SignalWithEntityId<SudoRetrieveThing>,org.eclipse.ditto.base.model.signals.WithName,org.eclipse.ditto.base.model.signals.WithResource,org.eclipse.ditto.base.model.signals.WithType,SudoCommand<SudoRetrieveThing>
@Immutable
@AllValuesAreNonnullByDefault
public final class SudoRetrieveThing
extends org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThing>
implements SudoCommand<SudoRetrieveThing>, org.eclipse.ditto.base.model.signals.SignalWithEntityId<SudoRetrieveThing>
Command which retrieves a
Thing 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 Thing" 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 SudoRetrieveThingCreates a newSudoRetrieveThingfrom a JSON string.static SudoRetrieveThingfromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThingfrom a JSON object.org.eclipse.ditto.base.model.signals.commands.Command.Categoryorg.eclipse.ditto.base.model.entity.id.EntityIdOptional<org.eclipse.ditto.json.JsonFieldSelector>Returns the JSON field selector which is to be included in the JSON of each retrieved Thing.inthashCode()static SudoRetrieveThingof(org.eclipse.ditto.things.model.ThingId thingId, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThing.static SudoRetrieveThingof(org.eclipse.ditto.things.model.ThingId thingId, org.eclipse.ditto.json.JsonFieldSelector selectedFields, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThing.setDittoHeaders(org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) toString()booleanReturns whether the resulting thing should be serialized using its original schema version.static SudoRetrieveThingwithOriginalSchemaVersion(org.eclipse.ditto.things.model.ThingId thingId, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThing.static SudoRetrieveThingwithOriginalSchemaVersion(org.eclipse.ditto.things.model.ThingId thingId, org.eclipse.ditto.json.JsonFieldSelector selectedFields, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThing.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 Thing" command.- See Also:
-
TYPE
Type of this command.- See Also:
-
-
Method Details
-
of
public static SudoRetrieveThing of(org.eclipse.ditto.things.model.ThingId thingId, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThing.- Parameters:
thingId- the ID of the Thing to be retrieved.dittoHeaders- the command headers of the request.- Returns:
- a command for retrieving a Thing without authorization.
- Throws:
NullPointerException- if any argument isnull.
-
of
public static SudoRetrieveThing of(org.eclipse.ditto.things.model.ThingId thingId, @Nullable org.eclipse.ditto.json.JsonFieldSelector selectedFields, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThing.- Parameters:
thingId- the ID of the Thing 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 a Thing without authorization.
- Throws:
NullPointerException- if any argument isnullexcept theselectedFields
-
withOriginalSchemaVersion
public static SudoRetrieveThing withOriginalSchemaVersion(org.eclipse.ditto.things.model.ThingId thingId, @Nullable org.eclipse.ditto.json.JsonFieldSelector selectedFields, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThing. The returned thing is serialized using its original schema version.- Parameters:
thingId- the ID of the Thing 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 a Thing without authorization.
- Throws:
NullPointerException- if any argument isnullexcept theselectedFields.
-
withOriginalSchemaVersion
public static SudoRetrieveThing withOriginalSchemaVersion(org.eclipse.ditto.things.model.ThingId thingId, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThing. The returned thing is serialized using its original schema version.- Parameters:
thingId- the ID of the Thing to be retrieved.dittoHeaders- the command headers of the request.- Returns:
- a command for retrieving a Thing without authorization.
- Throws:
NullPointerException- if any argument isnullexcept theselectedFields.
-
fromJson
public static SudoRetrieveThing fromJson(String jsonString, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThingfrom a JSON string.- Parameters:
jsonString- the JSON string of which a new SudoRetrieveThing is to be created.dittoHeaders- the optional command headers of the request.- Returns:
- the SudoRetrieveThing 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 SudoRetrieveThing fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Creates a newSudoRetrieveThingfrom a JSON object.- Parameters:
jsonObject- the JSON string of which a new SudoRetrieveThing is to be created.dittoHeaders- the optional command headers of the request.- Returns:
- the SudoRetrieveThing 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.
-
getEntityId
public org.eclipse.ditto.base.model.entity.id.EntityId getEntityId()- Specified by:
getEntityIdin interfaceorg.eclipse.ditto.base.model.entity.id.WithEntityId
-
useOriginalSchemaVersion
public boolean useOriginalSchemaVersion()Returns whether the resulting thing should be serialized using its original schema version.- Returns:
- a boolean holding the info whether the resulting thing should be serialized by its original schema version
-
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<SudoRetrieveThing>
-
getCategory
public org.eclipse.ditto.base.model.signals.commands.Command.Category getCategory()- Specified by:
getCategoryin interfaceorg.eclipse.ditto.base.model.signals.commands.Command<SudoRetrieveThing>
-
setDittoHeaders
public SudoRetrieveThing setDittoHeaders(org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) - Specified by:
setDittoHeadersin interfaceorg.eclipse.ditto.base.model.signals.commands.Command<SudoRetrieveThing>- Specified by:
setDittoHeadersin interfaceorg.eclipse.ditto.base.model.headers.DittoHeadersSettable<SudoRetrieveThing>- Specified by:
setDittoHeadersin interfaceSudoCommand<SudoRetrieveThing>
-
equals
- Overrides:
equalsin classorg.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThing>
-
canEqual
- Overrides:
canEqualin classorg.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThing>
-
hashCode
public int hashCode()- Overrides:
hashCodein classorg.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThing>
-
toString
- Overrides:
toStringin classorg.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThing>
-