Class ThingAcknowledgementsFactory
java.lang.Object
org.eclipse.ditto.things.model.signals.acks.ThingAcknowledgementsFactory
This class provides factory methods for getting instances of
Acknowledgements in the context of Thing entity.- Since:
- 1.1.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic org.eclipse.ditto.base.model.signals.acks.AcknowledgementsnewAcknowledgements(Collection<org.eclipse.ditto.base.model.signals.acks.Acknowledgement> acknowledgements, org.eclipse.ditto.base.model.headers.DittoHeaders dittoHeaders) Returns a new instance ofAcknowledgementscombining several passed in acknowledgements with a combined status code.static org.eclipse.ditto.base.model.signals.acks.AcknowledgementsnewAcknowledgements(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 newAcknowledgementsbased on the passed params, including the containedAcknowledgements.
-
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 ofAcknowledgementscombining 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 isnull.IllegalArgumentException- if the givenacknowledgementsare 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 newAcknowledgementsbased on the passed params, including the containedAcknowledgements.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 correcthttpStatus.- 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 isnull.IllegalArgumentException- if the givenacknowledgementsare empty or if the entity IDs or entity types of the given acknowledgements are not equal.- Since:
- 2.0.0
-