Class ThingAcknowledgementsFactory

java.lang.Object
org.eclipse.ditto.things.model.signals.acks.ThingAcknowledgementsFactory

@Immutable public final class ThingAcknowledgementsFactory extends Object
This class provides factory methods for getting instances of Acknowledgements in the context of Thing entity.
Since:
1.1.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.eclipse.ditto.base.model.signals.acks.Acknowledgements
    newAcknowledgements(Collection<org.eclipse.ditto.base.model.signals.acks.Acknowledgement> acknowledgements, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Returns a new instance of Acknowledgements combining several passed in acknowledgements with a combined status code.
    static org.eclipse.ditto.base.model.signals.acks.Acknowledgements
    newAcknowledgements(org.eclipse.ditto.base.model.entity.id.EntityId entityId, Collection<org.eclipse.ditto.base.model.signals.acks.Acknowledgement> acknowledgements, org.eclipse.ditto.base.model.common.HttpStatus httpStatus, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
    Returns a new Acknowledgements based on the passed params, including the contained Acknowledgements.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • newAcknowledgements

      public static org.eclipse.ditto.base.model.signals.acks.Acknowledgements newAcknowledgements(Collection<org.eclipse.ditto.base.model.signals.acks.Acknowledgement> acknowledgements, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Returns a new instance of Acknowledgements combining several passed in acknowledgements with a combined status code.
      Parameters:
      acknowledgements - the acknowledgements to be included in the result.
      dittoHeaders - the DittoHeaders of the result.
      Returns:
      the Acknowledgements.
      Throws:
      NullPointerException - if any argument is null.
      IllegalArgumentException - if the given acknowledgements are empty or if the entity IDs or entity types of the given acknowledgements are not equal.
    • newAcknowledgements

      public static org.eclipse.ditto.base.model.signals.acks.Acknowledgements newAcknowledgements(org.eclipse.ditto.base.model.entity.id.EntityId entityId, Collection<org.eclipse.ditto.base.model.signals.acks.Acknowledgement> acknowledgements, org.eclipse.ditto.base.model.common.HttpStatus httpStatus, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders)
      Returns a new Acknowledgements based on the passed params, including the contained Acknowledgements.

      Should only be used for deserializing from a JSON representation, as newAcknowledgements(java.util.Collection, org.eclipse.ditto.base.model.headers.DittoHeaders) does e.g. the calculation of the correct httpStatus.

      Parameters:
      entityId - the ID of the affected entity being acknowledged.
      acknowledgements - the map of acknowledgements to be included in the result.
      httpStatus - the HTTP status of the combined Acknowledgements.
      dittoHeaders - the headers of the returned Acknowledgements instance.
      Returns:
      the Acknowledgements.
      Throws:
      NullPointerException - if any argument is null.
      IllegalArgumentException - if the given acknowledgements are empty or if the entity IDs or entity types of the given acknowledgements are not equal.
      Since:
      2.0.0