|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.silverpeas.form.displayers.AbstractFieldDisplayer<FileField>
com.silverpeas.form.displayers.AbstractFileFieldDisplayer
public abstract class AbstractFileFieldDisplayer
| Nested Class Summary | |
|---|---|
protected static class |
AbstractFileFieldDisplayer.Operation
The different kinds of operation that can be applied into an attached file. |
| Field Summary | |
|---|---|
protected static String |
OPERATION_KEY
|
| Constructor Summary | |
|---|---|
AbstractFileFieldDisplayer()
|
|
| Method Summary | |
|---|---|
protected void |
checkFieldType(String typeName,
String contextCall)
Checks the type of the field is as expected. |
protected SimpleDocument |
createSimpleDocument(String objectId,
String componentId,
org.apache.commons.fileupload.FileItem item,
String fileName,
String userId,
boolean versionned)
|
protected void |
deleteAttachment(String attachmentId,
PagesContext pageContext)
Deletes the specified attachment, identified by its unique identifier.? |
void |
displayScripts(PrintWriter out,
FieldTemplate template,
PagesContext pageContext)
Prints the javascripts which will be used to control the new value given to the named field. |
String[] |
getManagedTypes()
Returns the name of the managed types. |
protected boolean |
isDeletion(AbstractFileFieldDisplayer.Operation operation,
String attachmentId)
Is the specified operation is a deletion? |
boolean |
isDisplayedMandatory()
|
protected boolean |
isUpdate(AbstractFileFieldDisplayer.Operation operation,
String attachmentId)
Is the specified operation is an update? |
protected String |
processInput(List<org.apache.commons.fileupload.FileItem> items,
FileField field,
PagesContext pageContext)
|
protected String |
processUploadedFile(List<org.apache.commons.fileupload.FileItem> items,
String parameterName,
PagesContext pagesContext)
|
List<String> |
update(List<org.apache.commons.fileupload.FileItem> items,
FileField field,
FieldTemplate template,
PagesContext pageContext)
Updates the value of the field. |
List<String> |
update(String attachmentId,
FileField field,
FieldTemplate template,
PagesContext pagesContext)
Updates the value of the field. |
| Methods inherited from class com.silverpeas.form.displayers.AbstractFieldDisplayer |
|---|
index |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.silverpeas.form.FieldDisplayer |
|---|
display, getNbHtmlObjectsDisplayed |
| Field Detail |
|---|
protected static final String OPERATION_KEY
| Constructor Detail |
|---|
public AbstractFileFieldDisplayer()
| Method Detail |
|---|
protected SimpleDocument createSimpleDocument(String objectId,
String componentId,
org.apache.commons.fileupload.FileItem item,
String fileName,
String userId,
boolean versionned)
throws IOException
IOException
protected void deleteAttachment(String attachmentId,
PagesContext pageContext)
attachmentId - the unique identifier of the attachment to delete.pageContext - the context of the page.public String[] getManagedTypes()
public void displayScripts(PrintWriter out,
FieldTemplate template,
PagesContext pageContext)
throws IOException
pageContext -
IOException
public List<String> update(List<org.apache.commons.fileupload.FileItem> items,
FileField field,
FieldTemplate template,
PagesContext pageContext)
throws FormException
FieldDisplayer
update in interface FieldDisplayer<FileField>update in class AbstractFieldDisplayer<FileField>FormException
protected String processInput(List<org.apache.commons.fileupload.FileItem> items,
FileField field,
PagesContext pageContext)
public List<String> update(String attachmentId,
FileField field,
FieldTemplate template,
PagesContext pagesContext)
throws FormException
FieldDisplayer
FormException
protected boolean isDeletion(AbstractFileFieldDisplayer.Operation operation,
String attachmentId)
operation - the operation.attachmentId - the identifier of the attachment on which the operation is.
protected boolean isUpdate(AbstractFileFieldDisplayer.Operation operation,
String attachmentId)
operation - the operation.attachmentId - the identifier of the attachment on which the operation is.
protected String processUploadedFile(List<org.apache.commons.fileupload.FileItem> items,
String parameterName,
PagesContext pagesContext)
throws IOException
IOExceptionpublic boolean isDisplayedMandatory()
protected void checkFieldType(String typeName,
String contextCall)
typeName - the name of the type.contextCall - the context of the call: which is the caller of this method. This parameter
is used for trace purpose.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||