/** * Constructs a new {@code UnknownTopicPathException} object with the exception message extracted from the given * JSON object. * * @param jsonObject the JSON to read the {@link JsonFields#MESSAGE} field from. * @param dittoHeaders the headers of the command which resulted in this exception. * @return the new UnknownTopicPathException. * @throws org.eclipse.ditto.json.JsonMissingFieldException if the {@code jsonObject} does not have the {@link * JsonFields#MESSAGE} field. */ public static UnknownTopicPathException fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders) { return new Builder() .dittoHeaders(dittoHeaders) .message(readMessage(jsonObject)) .description(readDescription(jsonObject).orElse(DEFAULT_DESCRIPTION)) .href(readHRef(jsonObject).orElse(null)) .build(); }
/** * Constructs a new {@code UnknownTopicPathException} object with the exception message extracted from the given * JSON object. * * @param jsonObject the JSON to read the {@link JsonFields#MESSAGE} field from. * @param dittoHeaders the headers of the command which resulted in this exception. * @return the new UnknownTopicPathException. * @throws org.eclipse.ditto.json.JsonMissingFieldException if the {@code jsonObject} does not have the {@link * JsonFields#MESSAGE} field. */ public static UnknownTopicPathException fromJson(final JsonObject jsonObject, final DittoHeaders dittoHeaders) { return new Builder() .dittoHeaders(dittoHeaders) .message(readMessage(jsonObject)) .description(readDescription(jsonObject).orElse(DEFAULT_DESCRIPTION)) .href(readHRef(jsonObject).orElse(null)) .build(); }
/** * Constructs a new {@code UnknownTopicPathException} object with given message. * * @param message detail message. This message can be later retrieved by the {@link #getMessage()} method. * @param dittoHeaders the headers of the command which resulted in this exception. * @return the new UnknownTopicPathException. */ public static UnknownTopicPathException fromMessage(final String message, final DittoHeaders dittoHeaders) { return new Builder() .dittoHeaders(dittoHeaders) .message(message) .build(); }
/** * A mutable builder for a {@code UnknownTopicPathException}. * * @param topicPath the topic path of the adaptable not supported. * @return the builder. */ public static Builder newBuilder(final TopicPath topicPath) { return new Builder(topicPath.getPath()); }
/** * Constructs a new {@code UnknownTopicPathException} object with given message. * * @param message detail message. This message can be later retrieved by the {@link #getMessage()} method. * @param dittoHeaders the headers of the command which resulted in this exception. * @return the new UnknownTopicPathException. */ public static UnknownTopicPathException fromMessage(final String message, final DittoHeaders dittoHeaders) { return new Builder() .dittoHeaders(dittoHeaders) .message(message) .build(); }
/** * A mutable builder for a {@code UnknownTopicPathException}. * * @param path the topic path of the adaptable not supported. * @return the builder. */ public static Builder newBuilder(final String path) { return new Builder(path); }
/** * A mutable builder for a {@code UnknownTopicPathException}. * * @param path the topic path of the adaptable not supported. * @return the builder. */ public static Builder newBuilder(final String path) { return new Builder(path); }
/** * A mutable builder for a {@code UnknownTopicPathException}. * * @param topicPath the topic path of the adaptable not supported. * @return the builder. */ public static Builder newBuilder(final TopicPath topicPath) { return new Builder(topicPath.getPath()); }