+ * Sets the request key of this image. The request key can only be set as
+ * long as no request key has yet been set.
+ *
+ * @param key
+ * The new request key of this image
+ * @return This image
+ */
+ public Image setKey(String key) {
+ Validation.begin().isNull("Current Image Key", this.key).isNotNull("New Image Key", key).check();
+ this.key = key;
+ return this;
+ }
+
+ /**
+ * Returns whether the image has already been inserted. An image is
+ * considered as having been inserted it its {@link #getKey() key} is not
+ * {@code null}.
+ *
+ * @return {@code true} if there is a key for this image, {@code false}
+ * otherwise
+ */
+ public boolean isInserted() {
+ return key != null;
+ }
+
+ /**