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.JsonFields

    Nested 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

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Name of the "Sudo Retrieve Thing" command.
    static final String
    Type of this command.

    Fields inherited from interface org.eclipse.ditto.base.model.signals.commands.Command

    TYPE_QUALIFIER

    Fields inherited from interface org.eclipse.ditto.things.api.commands.sudo.SudoCommand

    RESOURCE_TYPE, TYPE_PREFIX
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    appendPayload(org.eclipse.ditto.json.JsonObjectBuilder jsonObjectBuilder, org.eclipse.ditto.base.model.json.JsonSchemaVersion schemaVersion, Predicate<org.eclipse.ditto.json.JsonField> thePredicate)
     
    protected boolean
     
    boolean
     
    fromJson(String jsonString, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new SudoRetrieveThing from a JSON string.
    fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new SudoRetrieveThing from a JSON object.
    org.eclipse.ditto.base.model.signals.commands.Command.Category
     
    org.eclipse.ditto.base.model.entity.id.EntityId
     
    Optional<org.eclipse.ditto.json.JsonFieldSelector>
    Returns the JSON field selector which is to be included in the JSON of each retrieved Thing.
    int
     
    of(org.eclipse.ditto.things.model.ThingId thingId, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new SudoRetrieveThing.
    of(org.eclipse.ditto.things.model.ThingId thingId, org.eclipse.ditto.json.JsonFieldSelector selectedFields, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new SudoRetrieveThing.
    setDittoHeaders(org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
     
     
    boolean
    Returns whether the resulting thing should be serialized using its original schema version.
    withOriginalSchemaVersion(org.eclipse.ditto.things.model.ThingId thingId, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new SudoRetrieveThing.
    withOriginalSchemaVersion(org.eclipse.ditto.things.model.ThingId thingId, org.eclipse.ditto.json.JsonFieldSelector selectedFields, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new SudoRetrieveThing.

    Methods inherited from class org.eclipse.ditto.base.model.signals.commands.AbstractCommand

    getDittoHeaders, getManifest, getType, toJson

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.ditto.base.model.signals.commands.Command

    getImplementedSchemaVersion, toJson, toJson

    Methods inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable

    getLatestSchemaVersion, getSupportedSchemaVersions, implementsSchemaVersion, implementsSchemaVersion, toJsonString

    Methods inherited from interface org.eclipse.ditto.base.model.json.Jsonifiable.WithPredicate

    toJson, toJsonString, toJsonString

    Methods inherited from interface org.eclipse.ditto.base.model.signals.Signal

    getName

    Methods inherited from interface org.eclipse.ditto.things.api.commands.sudo.SudoCommand

    getResourcePath, getResourceType, getTypePrefix

    Methods inherited from interface org.eclipse.ditto.base.model.headers.WithDittoHeaders

    getDittoHeaders

    Methods inherited from interface org.eclipse.ditto.base.model.headers.WithManifest

    getManifest

    Methods inherited from interface org.eclipse.ditto.base.model.signals.WithType

    getType
  • Field Details

  • Method Details

    • of

      public static SudoRetrieveThing of(org.eclipse.ditto.things.model.ThingId thingId, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a new SudoRetrieveThing.
      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 is null.
    • 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 new SudoRetrieveThing.
      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 is null except the selectedFields
    • 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 new SudoRetrieveThing. 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 is null except the selectedFields.
    • withOriginalSchemaVersion

      public static SudoRetrieveThing withOriginalSchemaVersion(org.eclipse.ditto.things.model.ThingId thingId, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a new SudoRetrieveThing. 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 is null except the selectedFields.
    • fromJson

      public static SudoRetrieveThing fromJson(String jsonString, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a new SudoRetrieveThing from 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 - if jsonString is null.
      IllegalArgumentException - if jsonString is empty.
      org.eclipse.ditto.json.JsonParseException - if the passed in jsonString does not contain a JSON object or if it is not valid JSON.
      org.eclipse.ditto.json.JsonMissingFieldException - if the passed in jsonString was 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 new SudoRetrieveThing from 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 - if jsonObject is null.
      org.eclipse.ditto.json.JsonMissingFieldException - if the passed in jsonObject was not in the expected format.
    • getEntityId

      public org.eclipse.ditto.base.model.entity.id.EntityId getEntityId()
      Specified by:
      getEntityId in interface org.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

      public Optional<org.eclipse.ditto.json.JsonFieldSelector> 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:
      appendPayload in class org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThing>
    • getCategory

      public org.eclipse.ditto.base.model.signals.commands.Command.Category getCategory()
      Specified by:
      getCategory in interface org.eclipse.ditto.base.model.signals.commands.Command<SudoRetrieveThing>
    • setDittoHeaders

      public SudoRetrieveThing setDittoHeaders(org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Specified by:
      setDittoHeaders in interface org.eclipse.ditto.base.model.signals.commands.Command<SudoRetrieveThing>
      Specified by:
      setDittoHeaders in interface org.eclipse.ditto.base.model.headers.DittoHeadersSettable<SudoRetrieveThing>
      Specified by:
      setDittoHeaders in interface SudoCommand<SudoRetrieveThing>
    • equals

      public boolean equals(@Nullable Object o)
      Overrides:
      equals in class org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThing>
    • canEqual

      protected boolean canEqual(@Nullable Object other)
      Overrides:
      canEqual in class org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThing>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThing>
    • toString

      public String toString()
      Overrides:
      toString in class org.eclipse.ditto.base.model.signals.commands.AbstractCommand<SudoRetrieveThing>