|
||||||||||
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
public abstract class EditPublicationHandler
This form handler processes Publication
forms.
Publication
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 | |
---|---|
EditPublicationHandler()
|
Method Summary | |
---|---|
boolean |
cannotRead()
Returns true if the loggedMember cannot read this publication. |
boolean |
containsHiddenParts()
|
HashMap<String,String> |
getAllAvailableTitleML()
|
String |
getAnchor()
Get the value of anchor. |
int |
getAuthorizedGroupsCount()
|
int |
getAuthorizedMemberSetCount()
|
Date |
getAvailableAdate()
|
Member |
getAvailableAuthor()
|
Set<Group> |
getAvailableAuthorizedGroupSet()
|
Set<Member> |
getAvailableAuthorizedMemberSet()
|
Category[] |
getAvailableCategories()
|
Date |
getAvailableEdate()
|
TreeSet<String> |
getAvailableFriendlyURLSet()
|
Workflow |
getAvailableInternalWorkflow()
|
String |
getAvailableMainLanguage()
|
boolean |
getAvailableMajorUpdate()
|
Date |
getAvailablePdate()
|
int |
getAvailablePstatus()
|
HashMap<String,TreeSet<Member>> |
getAvailableRoleMap()
|
Date |
getAvailableSdate()
|
TypeTemplateEntry |
getAvailableTemplateEntry(String usage)
|
String[] |
getAvailableTemplates()
|
String |
getAvailableTitle()
|
String |
getAvailableTitle(String lang)
|
HashMap<String,String> |
getAvailableTitleML()
|
boolean |
getAvailableTracked()
|
Set<Group> |
getAvailableUpdateGroupSet()
|
Set<Member> |
getAvailableUpdateMemberSet()
|
String |
getAvailableWFNote()
|
Workspace |
getAvailableWorkspace()
|
Set<Category> |
getCategorySet(String inputName)
Returns the root set bound to the given inputName |
protected HashMap |
getControllerContext()
Build a controller context. |
Class<? extends Data> |
getDataClass()
|
Set<Group> |
getDefaultAuthorizedGroupSet()
This method should be overriden by sub-classes |
Set<Member> |
getDefaultAuthorizedMemberSet()
This method should be overriden by sub-classes |
Set<Category> |
getDefaultCategorySet()
This method should be overriden by sub-classes |
String |
getDefaultTemplateUsage()
Returns the default template usage used to display the publication. |
Set<Group> |
getDefaultUpdateGroupSet()
This method should be overriden by sub-classes |
Set<Member> |
getDefaultUpdateMemberSet()
This method should be overriden by sub-classes |
FieldStatus |
getFieldStatus(String fieldName)
Returns the FieldStatus for the given field. |
Set<Category> |
getHiddenCatSet(Set<Category> typeRemovedCatSet)
|
TreeSet<Member> |
getMemberSetAssignedToRole(String roleId)
|
int |
getOpenTab()
|
Publication |
getPublication()
|
abstract Class<? extends Publication> |
getPublicationClass()
|
boolean |
getShowAllTabs()
|
boolean |
getShowContentTabOnly()
|
String |
getTabLabel(String tabId)
|
Object |
getTitleFieldValue(boolean isTitleML)
|
String |
getTypeLabel()
Returns the label of the edited type. |
int |
getUpdateGroupsCount()
|
int |
getUpdateMemberSetCount()
|
String |
getWorkAreaCss()
Returns the css class used for style, and javascript window resize in footer in popup edition. |
Workflow |
getWorkflow()
|
WSTypeEntry |
getWSTypeEntry()
|
protected void |
init()
Method to implement if you need to initialize your handler from parameter received, prior to all security validation. |
protected boolean |
internalPerformCreate()
|
protected boolean |
internalPerformDelete()
|
protected boolean |
internalPerformUpdate()
|
boolean |
isAdvancedTabHidden()
|
boolean |
isCategoryTabHidden()
|
boolean |
isContentTabOnly()
|
boolean |
isDBType()
Returns true if the publication class extends DBData. |
boolean |
isExpanded(Category cat,
String inputName)
|
boolean |
isFieldEdition(String field)
|
boolean |
isForm()
Is this handler dedicated to Form sub-class processing. |
boolean |
isLocked()
Returns true if the publication is (weakly) locked. |
boolean |
isReadRightTabHidden()
|
boolean |
isStrongLocked()
Returns true if the publication is a FileDocument with a strong lock. |
boolean |
isTabForced()
|
boolean |
isTemplateTabHidden()
|
boolean |
isUpdateRightTabHidden()
|
boolean |
isWorkflowTabHidden()
|
boolean |
performAddItem()
|
boolean |
performAddItemReadRights()
|
boolean |
performAddItemUpdateRights()
|
boolean |
performCreate()
|
boolean |
performDelete()
|
boolean |
performMerge()
|
boolean |
performRefresh()
|
boolean |
performUpdate()
|
void |
prepare()
|
boolean |
processAction()
Method to be implemented to check/validate action to be performed and process them. |
protected boolean |
processStatus(ControllerStatus status)
Process the ControllerStatus: do nothing if OK, or send on forbidden, or put a warning message in the request. |
protected void |
releaseDBWorkingPub()
|
protected void |
sendRedirect()
|
void |
setAdate(String v)
|
void |
setAnchor(String v)
Set the value of anchor. |
void |
setAuthor(String v)
|
void |
setAuthorForced(boolean v,
Member author)
|
void |
setAuthorizedGroupIds(String[] v)
|
void |
setAuthorizedMemberIds(String[] v)
|
void |
setAuthorizedMemberSetAddCount(int v)
|
void |
setCids(String[] v)
|
void |
setEdate(String v)
|
void |
setFields(Publication pub)
Set the common (Publication) fields. |
void |
setFriendlyURL(String[] v)
Set the friendly urls. |
void |
setId(String id)
Set the value of id. |
void |
setInternalWf(String internalWf)
|
void |
setItemPos(int v)
|
void |
setMainLanguage(String v)
Set the main language. |
void |
setMajorUpdate(String v)
|
void |
setOpAddItem(String v)
|
void |
setOpAddItemReadRights(String v)
|
void |
setOpAddItemUpdateRights(String v)
|
void |
setOpenTab(int openTab)
|
void |
setOpMerge(String v)
|
void |
setPdate(String v)
|
void |
setPstatus(int v)
|
void |
setRoleId(String[] v)
Set the role ids |
void |
setSdate(String v)
|
void |
setShowAllTabs(boolean v)
|
void |
setShowContentTabOnly(boolean v)
since jcms-5.5.0 |
void |
setTemplates(String[] v)
|
void |
setTitle(String[] v)
|
void |
setTracked(boolean v)
|
void |
setUpdateGroupIds(String[] v)
|
void |
setUpdateMemberIds(String[] v)
|
void |
setUpdateMemberSetAddCount(int v)
|
void |
setWfNote(String v)
|
boolean |
showForceDelete()
Returns true if the "Force deletion" option must be proposed. |
boolean |
showFriendlyURL()
|
boolean |
showLockWarning()
Returns true if the lock warning message must be displayed. |
boolean |
showMainLanguage()
|
boolean |
showReaderTracker()
|
boolean |
showSDate()
|
boolean |
showWFRole()
|
void |
updateCids(String[] v)
Update the cids (this method is called by setCids() and all setCidsXXX() methods) |
boolean |
validateAddItem()
|
boolean |
validateAddItemReadRights()
|
boolean |
validateAddItemUpdateRights()
|
boolean |
validateBeforeOp()
|
boolean |
validateCreate()
|
boolean |
validateDelete()
|
boolean |
validateFieldFormat()
|
boolean |
validateMember()
|
boolean |
validateMerge()
|
boolean |
validateUpdate()
|
boolean |
validateWorkspace()
|
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
public static final String ID_TOKEN
public static final String DISPLAY_URL_TOKEN
public static final String PREVIEW_URL_TOKEN
protected boolean opMerge
protected boolean opAddItem
protected boolean opAddItemReadRights
protected boolean opAddItemUpdateRights
protected boolean majorUpdate
protected String title
protected HashMap<String,String> titleML
protected String[] cids
protected String[] templates
protected int pstatus
protected int oldPstatus
protected Date pdate
protected Date edate
protected Date sdate
protected Date adate
protected String wfNote
protected int authorizedMemberSetAddCount
protected int authorizedGroupsAddCount
protected int updateMemberSetAddCount
protected int updateGroupsAddCount
protected String anchor
protected boolean isTracked
protected String mainLanguage
protected TreeSet<String> friendlyURLSet
protected String[] roleIds
protected Member[] roleMembers
protected HashMap<String,TreeSet<Member>> roleMap
protected Publication publication
protected Class<? extends Publication> pubClass
protected WSTypeEntry wste
protected Workflow wf
protected Workflow internalWf
protected Member author
protected boolean isAuthorForced
protected Set<Category> categorySet
protected TreeSet<Member> authorizedMemberSet
protected TreeSet<Group> authorizedGroupSet
protected TreeSet<Member> updateMemberSet
protected TreeSet<Group> updateGroupSet
protected int openTab
protected boolean showAllTabs
protected boolean showContentTabOnly
protected String typeLabel
protected boolean isContentType
protected boolean isPortletType
protected boolean isFormType
protected boolean isUGCType
protected boolean isDBType
protected boolean isCategorized
protected String listToProcess
protected int itemPos
protected Publication workingPub
protected Map<String,FieldStatus> fieldStatusMap
Constructor Detail |
---|
public EditPublicationHandler()
Method Detail |
---|
public Class<? extends Data> getDataClass()
getDataClass
in class EditDataHandler
public abstract Class<? extends Publication> getPublicationClass()
public Publication getPublication()
getPublication
in class JcmsJspContext
public void setInternalWf(String internalWf)
public Workflow getAvailableInternalWorkflow()
public Workflow getWorkflow()
public WSTypeEntry getWSTypeEntry()
public String getTabLabel(String tabId)
protected void init()
JcmsFormHandler
You must absolutely not perform any action which modify data or site configuration.
Therefore it is strongly recommend NOT TO implement this method, or use
very wisely.
init
in class JcmsFormHandler
public boolean processAction() throws IOException
JcmsFormHandler
Default implementation is to return false. No need to call super method.
This method may NOT be invoked at all if security validation are not met.
You must ensure your handler and JSP can work properly without any code invoked
in this method.
processAction
in class EditDataHandler
IOException
public boolean validateBeforeOp()
protected void releaseDBWorkingPub()
protected void sendRedirect() throws IOException
sendRedirect
in class EditDataHandler
IOException
public boolean validateMember() throws IOException
IOException
public boolean validateWorkspace() throws IOException
IOException
protected boolean processStatus(ControllerStatus status) throws IOException
JcmsFormHandler
processStatus
in class JcmsFormHandler
status
- the ControllerStatus to be processed
IOException
public boolean validateFieldFormat()
public boolean validateCreate() throws IOException
IOException
public boolean performCreate() throws IOException
IOException
protected boolean internalPerformCreate() throws IOException
IOException
protected HashMap getControllerContext()
JcmsFormHandler
getControllerContext
in class EditDataHandler
public boolean validateUpdate() throws IOException
IOException
public boolean performUpdate() throws IOException
IOException
protected boolean internalPerformUpdate() throws IOException
IOException
public boolean validateDelete() throws IOException
IOException
public boolean performDelete() throws IOException
IOException
protected boolean internalPerformDelete() throws IOException
IOException
public boolean validateMerge()
public boolean performMerge() throws IOException
IOException
public boolean validateAddItem()
public boolean performAddItem() throws IOException
IOException
public boolean validateAddItemReadRights()
public boolean performAddItemReadRights() throws IOException
IOException
public boolean validateAddItemUpdateRights()
public boolean performAddItemUpdateRights() throws IOException
IOException
public boolean performRefresh() throws IOException
performRefresh
in class EditDataHandler
IOException
public void prepare()
public void setFields(Publication pub)
pub
- the publication to set the fieldspublic boolean isFieldEdition(String field)
isFieldEdition
in class JcmsFormHandler
JcmsFormHandler.getEditFieldSet()
public boolean isDBType()
public boolean showWFRole()
public boolean showReaderTracker()
public boolean showMainLanguage()
public boolean showSDate()
public boolean showFriendlyURL()
public boolean showForceDelete()
public boolean isLocked()
public boolean isStrongLocked()
public boolean showLockWarning()
public void setOpenTab(int openTab)
public int getOpenTab()
public boolean isTabForced()
public boolean containsHiddenParts()
public void setShowAllTabs(boolean v)
public boolean getShowAllTabs()
public void setShowContentTabOnly(boolean v)
public boolean getShowContentTabOnly()
public boolean isContentTabOnly()
public boolean isCategoryTabHidden()
public boolean isReadRightTabHidden()
public boolean isUpdateRightTabHidden()
public boolean isTemplateTabHidden()
public boolean isWorkflowTabHidden()
public boolean isAdvancedTabHidden()
public Category[] getAvailableCategories()
public Set<Category> getCategorySet(String inputName)
inputName
- the name of category set to get
public Set<Category> getHiddenCatSet(Set<Category> typeRemovedCatSet)
public boolean isExpanded(Category cat, String inputName)
public Object getTitleFieldValue(boolean isTitleML)
public String getAvailableTitle()
public HashMap<String,String> getAllAvailableTitleML()
public HashMap<String,String> getAvailableTitleML()
public String getAvailableTitle(String lang)
public TypeTemplateEntry getAvailableTemplateEntry(String usage)
public String[] getAvailableTemplates()
public int getAvailablePstatus()
public Date getAvailablePdate()
public Date getAvailableEdate()
public Date getAvailableSdate()
public Date getAvailableAdate()
public String getAvailableWFNote()
public Set<Member> getAvailableAuthorizedMemberSet()
public Set<Member> getDefaultAuthorizedMemberSet()
public Set<Group> getAvailableAuthorizedGroupSet()
public int getAuthorizedGroupsCount()
public int getUpdateGroupsCount()
public Set<Group> getDefaultAuthorizedGroupSet()
public Set<Category> getDefaultCategorySet()
public Set<Member> getAvailableUpdateMemberSet()
public Set<Member> getDefaultUpdateMemberSet()
public Set<Group> getAvailableUpdateGroupSet()
public Set<Group> getDefaultUpdateGroupSet()
public Member getAvailableAuthor()
public void setAuthorForced(boolean v, Member author)
public void updateCids(String[] v)
public String getDefaultTemplateUsage()
public void setOpMerge(String v)
public void setOpAddItem(String v)
public void setOpAddItemReadRights(String v)
public void setOpAddItemUpdateRights(String v)
public void setMajorUpdate(String v)
public boolean getAvailableMajorUpdate()
public boolean isForm()
public void setItemPos(int v)
public void setId(String id)
setId
in class EditDataHandler
id
- Value to assign to id.public void setTitle(String[] v)
public void setCids(String[] v)
public void setAuthor(String v)
public void setTemplates(String[] v)
public void setPstatus(int v)
public void setPdate(String v)
public void setEdate(String v)
public void setSdate(String v)
public void setAdate(String v)
public void setWfNote(String v)
public void setAuthorizedMemberSetAddCount(int v)
public int getAuthorizedMemberSetCount()
public void setAuthorizedMemberIds(String[] v)
public void setAuthorizedGroupIds(String[] v)
public void setUpdateMemberSetAddCount(int v)
public int getUpdateMemberSetCount()
public void setUpdateMemberIds(String[] v)
public void setUpdateGroupIds(String[] v)
public String getAnchor()
public void setAnchor(String v)
v
- Value to assign to anchor.public void setTracked(boolean v)
public boolean getAvailableTracked()
public Workspace getAvailableWorkspace()
public void setMainLanguage(String v)
public String getAvailableMainLanguage()
public void setFriendlyURL(String[] v)
public TreeSet<String> getAvailableFriendlyURLSet()
public void setRoleId(String[] v)
public HashMap<String,TreeSet<Member>> getAvailableRoleMap()
public TreeSet<Member> getMemberSetAssignedToRole(String roleId)
roleId
- a WFRole id
public String getTypeLabel()
public boolean cannotRead()
public String getWorkAreaCss()
public FieldStatus getFieldStatus(String fieldName)
fieldName
- the name of the field
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |