/** * Creates a response to a {@link RetrieveAcl} command. * * @param thingId the Thing ID of the retrieved Acl. * @param acl the retrieved AccessControlList. * @param dittoHeaders the headers of the preceding command. * @return the response. * @throws NullPointerException if any argument is {@code null}. */ public static RetrieveAclResponse of(final String thingId, final JsonObject acl, final DittoHeaders dittoHeaders) { return new RetrieveAclResponse(thingId, HttpStatusCode.OK, acl, dittoHeaders); }
/** * Creates a response to a {@link RetrieveAcl} command. * * @param thingId the Thing ID of the retrieved Acl. * @param acl the retrieved AccessControlList. * @param dittoHeaders the headers of the preceding command. * @return the response. * @throws NullPointerException if any argument is {@code null}. */ public static RetrieveAclResponse of(final String thingId, final JsonObject acl, final DittoHeaders dittoHeaders) { return new RetrieveAclResponse(thingId, HttpStatusCode.OK, acl, dittoHeaders); }
/** * Creates a response to a {@link RetrieveAcl} command. * * @param thingId the Thing ID of the retrieved Acl. * @param acl the retrieved AccessControlList. * @param dittoHeaders the headers of the preceding command. * @return the response. * @throws NullPointerException if any argument is {@code null}. */ public static RetrieveAclResponse of(final String thingId, final AccessControlList acl, final DittoHeaders dittoHeaders) { return new RetrieveAclResponse(thingId, HttpStatusCode.OK, checkNotNull(acl, "AccessControlList") .toJson(dittoHeaders.getSchemaVersion().orElse(acl.getLatestSchemaVersion())), dittoHeaders); }
/** * Creates a response to a {@link RetrieveAcl} command. * * @param thingId the Thing ID of the retrieved Acl. * @param acl the retrieved AccessControlList. * @param dittoHeaders the headers of the preceding command. * @return the response. * @throws NullPointerException if any argument is {@code null}. */ public static RetrieveAclResponse of(final String thingId, final AccessControlList acl, final DittoHeaders dittoHeaders) { return new RetrieveAclResponse(thingId, HttpStatusCode.OK, checkNotNull(acl, "AccessControlList") .toJson(dittoHeaders.getSchemaVersion().orElse(acl.getLatestSchemaVersion())), dittoHeaders); }