Class ThingAcknowledgementsFactory
- java.lang.Object
-
- org.eclipse.ditto.things.model.signals.acks.ThingAcknowledgementsFactory
-
@Immutable public final class ThingAcknowledgementsFactory extends java.lang.ObjectThis class provides factory methods for getting instances ofAcknowledgementsin the context of Thing entity.- Since:
- 1.1.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.eclipse.ditto.base.model.signals.acks.AcknowledgementsnewAcknowledgements(java.util.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, java.util.Collection<? extends 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 Detail
-
newAcknowledgements
public static org.eclipse.ditto.base.model.signals.acks.Acknowledgements newAcknowledgements(java.util.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:
java.lang.NullPointerException- if any argument isnull.java.lang.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, java.util.Collection<? extends 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:
java.lang.NullPointerException- if any argument isnull.java.lang.IllegalArgumentException- if the givenacknowledgementsare empty or if the entity IDs or entity types of the given acknowledgements are not equal.- Since:
- 2.0.0
-
-