public class FileAttachmentEditorComponent extends com.vaadin.ui.VerticalLayout implements AttachmentEditorComponent
com.vaadin.ui.AbstractComponent.ComponentErrorEvent, com.vaadin.ui.AbstractComponent.ComponentErrorHandler
com.vaadin.ui.Component.ErrorEvent, com.vaadin.ui.Component.ErrorListener, com.vaadin.ui.Component.Event, com.vaadin.ui.Component.Focusable, com.vaadin.ui.Component.Listener
com.vaadin.terminal.Paintable.RepaintRequestEvent, com.vaadin.terminal.Paintable.RepaintRequestListener
com.vaadin.ui.Layout.AlignmentHandler, com.vaadin.ui.Layout.MarginHandler, com.vaadin.ui.Layout.MarginInfo, com.vaadin.ui.Layout.SpacingHandler
com.vaadin.ui.ComponentContainer.ComponentAttachEvent, com.vaadin.ui.ComponentContainer.ComponentAttachListener, com.vaadin.ui.ComponentContainer.ComponentDetachEvent, com.vaadin.ui.ComponentContainer.ComponentDetachListener
Modifier and Type | Field and Description |
---|---|
protected Attachment |
attachment |
protected ByteArrayOutputStream |
byteArrayOutputStream |
protected String |
fileName |
protected boolean |
fileUploaded |
protected com.vaadin.ui.Form |
form |
protected I18nManager |
i18nManager |
static String |
MIME_TYPE_EXTENTION_SPLIT_CHAR |
protected String |
mimeType |
protected String |
processInstanceId |
protected com.vaadin.ui.Label |
successIndicator |
protected String |
taskId |
protected TaskService |
taskService |
protected UploadComponent |
uploadComponent |
Constructor and Description |
---|
FileAttachmentEditorComponent(Attachment attachment,
String taskId,
String processInstanceId) |
FileAttachmentEditorComponent(String taskId,
String processInstanceId) |
Modifier and Type | Method and Description |
---|---|
protected String |
extractExtention(String fileName) |
Attachment |
getAttachment()
Get the edited or created attachment based on the values filled in.
|
protected String |
getAttachmentDescription() |
protected String |
getAttachmentName() |
protected String |
getFriendlyName(String name) |
protected void |
initDescription() |
protected void |
initFileUpload() |
protected void |
initName() |
protected void |
initSuccessIndicator() |
protected void |
setAttachmentName(String name) |
addComponent, addComponent, addComponentAsFirst, addListener, getComponent, getComponentAlignment, getComponentCount, getComponentIndex, getComponentIterator, getExpandRatio, isSpacing, isSpacingEnabled, paintContent, removeComponent, removeListener, replaceComponent, setComponentAlignment, setComponentAlignment, setComponentAlignment, setExpandRatio, setSpacing
changeVariables, fireClick, getMargin, setMargin, setMargin, setMargin
addListener, addListener, attach, detach, fireComponentAttachEvent, fireComponentDetachEvent, moveComponentsFrom, removeAllComponents, removeListener, removeListener, requestRepaintAll, setEnabled, setHeight, setWidth
addListener, addListener, addListener, addListener, addListener, addStyleName, childRequestedRepaint, fireComponentErrorEvent, fireComponentEvent, fireEvent, focus, getApplication, getCaption, getComponentError, getData, getDebugId, getDescription, getErrorHandler, getErrorMessage, getHeight, getHeightUnits, getIcon, getListeners, getLocale, getParent, getStyle, getStyleName, getWidth, getWidthUnits, getWindow, handleError, hasListeners, isEnabled, isImmediate, isReadOnly, isVisible, paint, removeListener, removeListener, removeListener, removeListener, removeListener, removeListener, removeStyleName, requestRepaint, requestRepaintRequests, setCaption, setComponentError, setData, setDebugId, setDescription, setErrorHandler, setHeight, setHeight, setHeightUnits, setIcon, setImmediate, setLocale, setParent, setReadOnly, setSizeFull, setSizeUndefined, setStyle, setStyleName, setVisible, setWidth, setWidth, setWidthUnits
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addListener, addStyleName, attach, childRequestedRepaint, detach, getApplication, getCaption, getIcon, getLocale, getParent, getStyleName, getWindow, isEnabled, isReadOnly, isVisible, removeListener, removeStyleName, setCaption, setEnabled, setIcon, setParent, setReadOnly, setStyleName, setVisible
addListener, getDebugId, paint, removeListener, requestRepaint, requestRepaintRequests, setDebugId
public static final String MIME_TYPE_EXTENTION_SPLIT_CHAR
protected Attachment attachment
protected String taskId
protected String processInstanceId
protected String fileName
protected ByteArrayOutputStream byteArrayOutputStream
protected String mimeType
protected boolean fileUploaded
protected I18nManager i18nManager
protected transient TaskService taskService
protected com.vaadin.ui.Form form
protected UploadComponent uploadComponent
protected com.vaadin.ui.Label successIndicator
public FileAttachmentEditorComponent(String taskId, String processInstanceId)
public FileAttachmentEditorComponent(Attachment attachment, String taskId, String processInstanceId)
protected void initSuccessIndicator()
protected void initFileUpload()
protected void initDescription()
protected void initName()
public Attachment getAttachment() throws com.vaadin.data.Validator.InvalidValueException
AttachmentEditorComponent
getAttachment
in interface AttachmentEditorComponent
com.vaadin.data.Validator.InvalidValueException
- when validation of the values failed. Editor should show
error-message in component.protected void setAttachmentName(String name)
protected String getAttachmentName()
protected String getAttachmentDescription()
Copyright © 2016 Alfresco. All rights reserved.