Class ImageConsumption
java.lang.Object
io.meeds.layout.model.ImageConsumption
The upload ids one layout write consumes: each id is claimed once while the
call's description is applied, before any write, and stands in the layout
as a placeholder until the attachments are saved and their URLs take its
place. The object id of an image is the call's key prefix, the live page or
site as the editor keys its attachments, then the element's storage id, or
the upload id for an element the call creates.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAttached(AttachedImage image) booleanisEmpty()static ImageConsumptionnone()void
-
Field Details
-
UPLOAD_NOT_FOUND
- See Also:
-
UPLOAD_USED_TWICE
- See Also:
-
REFUSAL_PREFIX
- See Also:
-
PLACEHOLDER
- See Also:
-
-
Constructor Details
-
ImageConsumption
-
-
Method Details
-
none
- Returns:
- a consumption that accepts no upload id: the writers of a call that carries none
-
claim
public String claim(String uploadId, String objectType, String elementStorageId, String path) throws org.exoplatform.commons.exception.ObjectNotFoundException - Parameters:
uploadId- the id the call gaveobjectType- the attachment object type of the backgroundelementStorageId- the styled element's storage id, null for one the call createspath- the image block's path, named by the refusal of a blank id or of a call that takes no image- Returns:
- the placeholder written in the layout until the URL is known
- Throws:
org.exoplatform.commons.exception.ObjectNotFoundException- when no staged resource has the id
-
getTargets
-
isEmpty
public boolean isEmpty() -
setUrl
-
resolve
-
addAttached
-
getAttached
-