public class CreateBlogPostFeHelper extends Object
Modifier and Type | Field and Description |
---|---|
static String |
PARAM_ATTACHMENTS_SESSION_ID
Name of parameter which holds the (unique) key for storing IDs of uploaded attachments in the
session.
|
static String |
PARAM_UPLOADING_WIDGET_ID
Name of parameter which holds the ID of the widget that made the upload.
|
Modifier and Type | Method and Description |
---|---|
static org.codehaus.jackson.node.ObjectNode |
createAttachmentJSONObject(Attachment attachment)
Creates a JSON object that describes an attachment.
|
static org.codehaus.jackson.node.ObjectNode |
createAttachmentJSONObject(AttachmentData attachment)
Creates a JSON object that describes an attachment.
|
static Set<Long> |
getUploadedAttachmentsFromSession(javax.servlet.http.HttpServletRequest request)
Returns a set with attachment IDs uploaded in the current session.
|
static void |
removeUploadedAttachmentsFromSession(javax.servlet.http.HttpServletRequest request)
Removes the attachment IDs set from the current session.
|
public static final String PARAM_ATTACHMENTS_SESSION_ID
public static final String PARAM_UPLOADING_WIDGET_ID
public static org.codehaus.jackson.node.ObjectNode createAttachmentJSONObject(Attachment attachment)
attachment
- the attachmentpublic static org.codehaus.jackson.node.ObjectNode createAttachmentJSONObject(AttachmentData attachment)
attachment
- the attachmentpublic static Set<Long> getUploadedAttachmentsFromSession(javax.servlet.http.HttpServletRequest request)
PARAM_ATTACHMENTS_SESSION_ID
. If the parameter is not provided null is returned. If
the list is not yet in the session it will be put there.request
- the servlet requestpublic static void removeUploadedAttachmentsFromSession(javax.servlet.http.HttpServletRequest request)
request
- the servlet requestCopyright © 2019 Communote team. All rights reserved.