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.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 Things" 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 SudoRetrieveThings from a JSON string.
    fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new SudoRetrieveThings from a JSON object.
    org.eclipse.ditto.base.model.signals.commands.Command.Category
     
    Optional<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.
    int
     
    of(List<org.eclipse.ditto.things.model.ThingId> thingIds, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new SudoRetrieveThings.
    of(List<org.eclipse.ditto.things.model.ThingId> thingIds, org.eclipse.ditto.json.JsonFieldSelector selectedFields, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Creates a new SudoRetrieveThings.
    setDittoHeaders(org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
     
     

    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 SudoRetrieveThings of(List<org.eclipse.ditto.things.model.ThingId> thingIds, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a new SudoRetrieveThings.
      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 is null.
    • 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 new SudoRetrieveThings.
      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 but selectedFields is null.
    • fromJson

      public static SudoRetrieveThings fromJson(String jsonString, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a new SudoRetrieveThings from 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 - 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 SudoRetrieveThings fromJson(org.eclipse.ditto.json.JsonObject jsonObject, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Creates a new SudoRetrieveThings from 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 - if jsonObject is null.
      org.eclipse.ditto.json.JsonMissingFieldException - if the passed in jsonObject was not in the expected format.
    • getThingIds

      public List<org.eclipse.ditto.things.model.ThingId> 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

      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<SudoRetrieveThings>
    • 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<SudoRetrieveThings>
    • setDittoHeaders

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

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

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

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

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