|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jalios.jcms.context.JcmsContext com.jalios.jcms.context.JcmsJspContext com.jalios.jcms.handler.JcmsFormHandler com.jalios.jcms.handler.EditDataHandler com.jalios.jcms.handler.EditPublicationHandler 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<Group> |
authorizedGroupSet
|
protected TreeSet<Member> |
authorizedMemberSet
|
protected Set<Category> |
categorySet
|
protected FileDocument |
document
|
protected String[] |
filename
|
protected boolean |
isModal
|
protected boolean |
opUpload
|
static String |
REVISION
|
Fields inherited from class com.jalios.jcms.handler.EditPublicationHandler |
---|
adate, anchor, author, authorizedGroupsAddCount, authorizedMemberSetAddCount, cids, DISPLAY_URL_TOKEN, edate, fieldStatusMap, friendlyURLSet, ID_TOKEN, internalWf, isAuthorForced, isCategorized, isContentType, isDBType, isFormType, isPortletType, isUGCType, itemPos, listToProcess, mainLanguage, majorUpdate, oldPstatus, opAddItem, opAddItemReadRights, opAddItemUpdateRights, openTab, opMerge, pdate, PREVIEW_URL_TOKEN, pubClass, publication, roleIds, roleMap, roleMembers, sdate, showAllTabs, showContentTabOnly, templates, title, titleML, typeLabel, updateGroupsAddCount, updateGroupSet, updateMemberSet, updateMemberSetAddCount, wf, wfNote, workingPub, wste |
Fields inherited from class com.jalios.jcms.handler.EditDataHandler |
---|
extFormHandler, formStep, id, isDeleteForced, op, opCancel, opCreate, opDelete, opFinish, opNext, opPrevious, opRefresh, opUpdate, resultOpCreate, resultOpDelete, resultOpUpdate |
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 |
---|
AJAX_REQUEST_ATTRIBUTES, BODY_HEADER, CSS_HEADER, cssboMap, cssfoMap, CUSTOM_HEADER, editIcon, HTTPEQUIV_HEADER, httpequivMap, HTTPNAME_HEADER, httpnameMap, initEditIcon, JAVASCRIPT_CODE_SET_ATTRIBUTE, JAVASCRIPT_SET_ATTRIBUTE, jsboSet, 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, isDBMember, isDebug, isLogged, loggedMember, request, response, userCountry, 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<String,String> |
getAllAvailableDescriptionML()
|
TreeSet<Group> |
getAvailableAuthorizedGroupSet()
|
TreeSet<Member> |
getAvailableAuthorizedMemberSet()
|
Category[] |
getAvailableCategories()
|
Set<Category> |
getAvailableCategorySet()
|
String |
getAvailableDescription()
|
String |
getAvailableDescription(String lang)
|
HashMap<String,String> |
getAvailableDescriptionML()
|
FileDocument |
getAvailableFileDocument()
|
FileDocument[] |
getAvailableFileDocuments()
|
String |
getAvailableFilename()
|
String |
getAvailableJsFunc()
|
boolean |
getAvailableMajorUpdate()
|
int |
getAvailableNbElt()
|
String |
getAvailableOpenerForm()
|
String |
getAvailableOpenerRefresh()
|
int |
getAvailablePstatus()
|
boolean |
getAvailableRemoveFile()
|
int |
getAvailableStartElt()
|
boolean |
getAvailableTracked()
|
String |
getAvailableType()
|
FieldStatus |
getFieldStatus(String fieldName)
Returns the FieldStatus for the given field. |
String |
getNextUploadStep()
Returns the JavaScript code to use depending of the upload step. |
Class<? extends Publication> |
getPublicationClass()
|
protected com.jalios.jcms.upload.DocUploadHandler.UploadStep |
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<String,String> |
handleUpload()
Performs upload of all FileDocuments and create/update FileDocuments. |
Map<String,String> |
handleUpload(DocUploadInfo dui)
This method allow the use of this formHandler by a programatic call, not in a jsp:usebean tag. |
String |
handleUploadError(Map<String,String> failedMap)
Convenient method that returns a list (ul/li) of errors for each files. |
void |
internalInit()
|
protected boolean |
isFieldMissing(String field)
Check if the given parameter is present in the query parameters |
boolean |
isInModal()
|
boolean |
isUpdate()
|
boolean |
isUploadEnabled()
|
boolean |
isUploading()
|
protected void |
performCreate(DocUploadInfo info,
Map<String,String> controllerFailedMap)
Performs creation of a FileDocument from a given DocUploadInfo. |
protected void |
performUpdate(DocUploadInfo info,
Map<String,String> controllerFailedMap)
Performs creation of a FileDocument from a given DocUploadInfo. |
void |
setCids(String[] v)
|
void |
setDescription(String[] v)
|
void |
setFilename(String[] v)
|
void |
setGids(String[] v)
|
void |
setId(String id)
Set the value of id. |
void |
setJsFunc(String v)
|
void |
setMajorUpdate(boolean v)
|
void |
setMids(String[] v)
|
void |
setModal(boolean modal)
|
void |
setNbElt(int v)
|
void |
setOpenerForm(String v)
|
void |
setOpUpload(String v)
|
void |
setPstatus(int v)
|
void |
setRefresh(String v)
|
void |
setRemoveFile(boolean v)
|
void |
setStartElt(int v)
|
void |
setTracked(boolean v)
|
void |
setType(String type)
|
void |
setUnlock(boolean v)
|
void |
setUnzipUploadedFiles(boolean unzip)
Set whether uploaded archives should be unziped and a new document created each time |
void |
setUploadEnabled(boolean uploadEnabled)
|
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 boolean isModal
protected FileDocument document
protected String[] filename
protected Set<Category> categorySet
protected TreeSet<Group> authorizedGroupSet
protected TreeSet<Member> authorizedMemberSet
protected boolean opUpload
Constructor Detail |
---|
public DocUploadHandler()
Method Detail |
---|
public Class<? extends Publication> getPublicationClass()
getPublicationClass
in class EditPublicationHandler
public void internalInit()
public String handleUploadError(Map<String,String> failedMap)
failedMap
- a map of errors returned by handleUpload()
public Map<String,String> handleUpload()
public Map<String,String> handleUpload(DocUploadInfo dui)
dui
- a DocUploadInfo
protected void performUpdate(DocUploadInfo info, Map<String,String> controllerFailedMap)
info
- a DocUploadInfocontrollerFailedMap
- a Map of errors.protected void performCreate(DocUploadInfo info, Map<String,String> controllerFailedMap)
info
- a DocUploadInfocontrollerFailedMap
- a Map of errors.public String getNextUploadStep()
protected com.jalios.jcms.upload.DocUploadHandler.UploadStep getStepCase()
public void setModal(boolean modal)
public boolean isInModal()
public void setId(String id)
EditPublicationHandler
setId
in class EditPublicationHandler
id
- Value to assign to id.public FileDocument getAvailableFileDocument()
public FileDocument[] getAvailableFileDocuments()
public boolean isUpdate()
protected boolean isFieldMissing(String field)
JcmsFormHandler
isFieldMissing
in class JcmsFormHandler
field
- the field to be checked
public void setFilename(String[] v)
public String getAvailableFilename()
public void setDescription(String[] v)
public String getAvailableDescription()
public HashMap<String,String> getAvailableDescriptionML()
public String getAvailableDescription(String lang)
public HashMap<String,String> getAllAvailableDescriptionML()
public void setCids(String[] v)
setCids
in class EditPublicationHandler
public Category[] getAvailableCategories()
getAvailableCategories
in class EditPublicationHandler
public Set<Category> getAvailableCategorySet()
public void setGids(String[] v)
public TreeSet<Group> getAvailableAuthorizedGroupSet()
getAvailableAuthorizedGroupSet
in class EditPublicationHandler
public void setMids(String[] v)
public TreeSet<Member> getAvailableAuthorizedMemberSet()
getAvailableAuthorizedMemberSet
in class EditPublicationHandler
public void setRemoveFile(boolean v)
public boolean getAvailableRemoveFile()
public void setUnlock(boolean v)
public void setPstatus(int v)
setPstatus
in class EditPublicationHandler
public int getAvailablePstatus()
getAvailablePstatus
in class EditPublicationHandler
public void setTracked(boolean v)
setTracked
in class EditPublicationHandler
public boolean getAvailableTracked()
getAvailableTracked
in class EditPublicationHandler
public void setUnzipUploadedFiles(boolean unzip)
unzip
- true to unzip, false to leave document intactpublic boolean getUnzipUploadedFiles()
public void setType(String type)
public String getAvailableType()
public void setOpenerForm(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 setJsFunc(String v)
public String getAvailableJsFunc()
public void setOpUpload(String v)
public boolean isUploading()
public void setMajorUpdate(boolean v)
public boolean getAvailableMajorUpdate()
getAvailableMajorUpdate
in class EditPublicationHandler
public boolean isUploadEnabled()
public void setUploadEnabled(boolean uploadEnabled)
public FieldStatus getFieldStatus(String fieldName)
getFieldStatus
in class EditPublicationHandler
fieldName
- the name of the field
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |