|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jalios.jcms.context.JcmsContext
com.jalios.jcms.context.JcmsJspContext
com.jalios.jcms.handler.JcmsFormHandler
com.jalios.jcms.upload.DocUploadHandler
public class DocUploadHandler
This form handler processes document upload. It use new UploadFilter mechanism and no longer decode MultiPart request.
MultipartFilter
Field Summary | |
---|---|
protected TreeSet |
authorizedGroupSet
|
protected TreeSet |
authorizedMemberSet
|
protected Set |
categorySet
|
protected FileDocument |
document
|
protected String[] |
filename
|
protected boolean |
majorUpdate
|
protected boolean |
op
|
protected boolean |
opUpload
|
static String |
REVISION
|
protected String |
title
|
protected HashMap |
titleML
|
Fields inherited from class com.jalios.jcms.handler.JcmsFormHandler |
---|
contextMap, editFieldSet, noRedirect, noSendRedirect, popupEdition, redirect, redirectOnClosePopup, workspaceForced |
Fields inherited from class com.jalios.jcms.context.JcmsJspContext |
---|
BODY_HEADER, CSS_HEADER, cssboMap, cssfoMap, CUSTOM_HEADER, editIcon, HTTPEQUIV_HEADER, httpequivMap, HTTPNAME_HEADER, httpnameMap, initEditIcon, JAVASCRIPT_CODE_SET_ATTRIBUTE, JAVASCRIPT_SET_ATTRIBUTE, JS_HEADER, jsboMap, jsboSet, jsfoMap, jsfoSet, out, pageContext, SHOW_EDIT_ICON, STYLE_HEADER |
Fields inherited from class com.jalios.jcms.context.JcmsContext |
---|
browser, caddy, channel, inFO, initDone, initWorkspace, isAdmin, isAjaxRequest, isDebug, isLogged, loggedMember, request, response, userLang, userLocale, workspace |
Fields inherited from interface com.jalios.util.JaliosConstants |
---|
CRLF, MILLIS_IN_ONE_DAY, MILLIS_IN_ONE_HOUR, MILLIS_IN_ONE_MINUTE, MILLIS_IN_ONE_MONTH, MILLIS_IN_ONE_SECOND, MILLIS_IN_ONE_WEEK, MILLIS_IN_ONE_YEAR |
Constructor Summary | |
---|---|
DocUploadHandler()
|
Method Summary | |
---|---|
HashMap |
getAllAvailableDescriptionML()
|
HashMap |
getAllAvailableTitleML()
|
TreeSet |
getAvailableAuthorizedGroupSet()
|
TreeSet |
getAvailableAuthorizedMemberSet()
|
Category[] |
getAvailableCategories()
|
Set |
getAvailableCategorySet()
|
String |
getAvailableDescription()
|
String |
getAvailableDescription(String lang)
|
HashMap |
getAvailableDescriptionML()
|
FileDocument |
getAvailableFileDocument()
|
FileDocument[] |
getAvailableFileDocuments()
|
String |
getAvailableFilename()
|
boolean |
getAvailableMajorUpdate()
|
int |
getAvailableNbElt()
|
String |
getAvailableOpenerForm()
|
String |
getAvailableOpenerRefresh()
|
int |
getAvailablePstatus()
|
boolean |
getAvailableRemoveFile()
|
int |
getAvailableStartElt()
|
String |
getAvailableTitle()
|
String |
getAvailableTitle(String lang)
|
HashMap |
getAvailableTitleML()
|
boolean |
getAvailableTracked()
|
String |
getNextUploadStep()
Returns the JavaScript code to use depending of the upload step. |
protected int |
getStepCase()
Returns the upload step depending of multiple paramter steps OpenerForm, OpenerRefresh, Redirect |
boolean |
getUnzipUploadedFiles()
Check if archives should be unziped and a new document created each time |
Map |
handleUpload()
Performs upload of all FileDocuments and create/update FileDocuments. |
String |
handleUploadError(Map failedMap)
Convenient method that returns a list (ul/li) of errors for each files. |
boolean |
isUpdate()
|
boolean |
isUploading()
|
protected void |
performCreate(DocUploadInfo info,
Map controllerFailedMap)
Performs creation of a FileDocument from a given DocUploadInfo. |
protected void |
performUpdate(DocUploadInfo info,
Map controllerFailedMap)
Performs creation of a FileDocument from a given DocUploadInfo. |
void |
setCids(String[] v)
|
void |
setDescription(String[] v)
|
void |
setFilename(String[] v)
|
void |
setForm(String v)
|
void |
setGids(String[] v)
|
void |
setId(String id)
|
void |
setMajorUpdate(boolean v)
|
void |
setMids(String[] v)
|
void |
setNbElt(int v)
|
void |
setOpUpload(String v)
|
void |
setPstatus(int v)
|
void |
setRefresh(String v)
|
void |
setRemoveFile(boolean v)
|
void |
setStartElt(int v)
|
void |
setTitle(String[] v)
|
void |
setTracked(boolean v)
|
void |
setUnlock(boolean v)
|
void |
setUnzipUploadedFiles(boolean unzip)
Set whether uploaded archives should be unziped and a new document created each time |
Methods inherited from class com.jalios.jcms.handler.JcmsFormHandler |
---|
getControllerContext, getEditFieldSet, getMainLangValue, getMainLangValueArray, getMLMap, getMLMapArray, getRedirect, getRedirectOnClosePopup, getWorkspace, isFieldEdition, isFieldMissing, isPartialFieldEdition, isPopupEdition, isWorkspaceForced, processStatus, sendRedirect, sendRedirect, setEditField, setNoRedirect, setNoSendRedirect, setPopupEdition, setRedirect, setRedirectOnClosePopup, setWorkspace, setWs, updateUploadedField, updateUploadedFields |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String REVISION
protected FileDocument document
protected String[] filename
protected String title
protected HashMap titleML
protected Set categorySet
protected TreeSet authorizedGroupSet
protected TreeSet authorizedMemberSet
protected boolean op
protected boolean opUpload
protected boolean majorUpdate
Constructor Detail |
---|
public DocUploadHandler()
Method Detail |
---|
public String handleUploadError(Map failedMap)
failedMap
- a map of errors returned by handleUpload()
public Map handleUpload()
protected void performUpdate(DocUploadInfo info, Map controllerFailedMap)
info
- a DocUploadInfocontrollerFailedMap
- a Map of errors.protected void performCreate(DocUploadInfo info, Map controllerFailedMap)
info
- a DocUploadInfocontrollerFailedMap
- a Map of errors.public String getNextUploadStep()
protected int getStepCase()
public void setId(String id)
public FileDocument getAvailableFileDocument()
public FileDocument[] getAvailableFileDocuments()
public boolean isUpdate()
public void setFilename(String[] v)
public String getAvailableFilename()
public void setTitle(String[] v)
public String getAvailableTitle()
public HashMap getAllAvailableTitleML()
public HashMap getAvailableTitleML()
public String getAvailableTitle(String lang)
public void setDescription(String[] v)
public String getAvailableDescription()
public HashMap getAvailableDescriptionML()
public String getAvailableDescription(String lang)
public HashMap getAllAvailableDescriptionML()
public void setCids(String[] v)
public Category[] getAvailableCategories()
public Set getAvailableCategorySet()
public void setGids(String[] v)
public TreeSet getAvailableAuthorizedGroupSet()
public void setMids(String[] v)
public TreeSet getAvailableAuthorizedMemberSet()
public void setRemoveFile(boolean v)
public boolean getAvailableRemoveFile()
public void setUnlock(boolean v)
public void setPstatus(int v)
public int getAvailablePstatus()
public void setTracked(boolean v)
public boolean getAvailableTracked()
public void setUnzipUploadedFiles(boolean unzip)
unzip
- true to unzip, false to leave document intactpublic boolean getUnzipUploadedFiles()
public void setForm(String v)
public String getAvailableOpenerForm()
public void setRefresh(String v)
public String getAvailableOpenerRefresh()
public void setNbElt(int v)
public int getAvailableNbElt()
public void setStartElt(int v)
public int getAvailableStartElt()
public void setOpUpload(String v)
public boolean isUploading()
public void setMajorUpdate(boolean v)
public boolean getAvailableMajorUpdate()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |