Class NewsAction
java.lang.Object
org.apache.struts.action.Action
org.apache.struts.actions.BaseAction
org.apache.struts.actions.DispatchAction
org.bgerp.action.base.BaseAction
org.bgerp.action.NewsAction
News and personal message actions
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringPersonalization key for the list of unread news IDsFields inherited from class BaseAction
l, log, MAPPER, PATH_JSP_ADMIN, PATH_JSP_OPEN, PATH_JSP_USER, PATH_JSP_USERMOB, setupFields inherited from class org.apache.struts.actions.DispatchAction
clazz, methods, typesFields inherited from class org.apache.struts.actions.BaseAction
messagesFields inherited from class org.apache.struts.action.Action
servlet -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.struts.action.ActionForwardnewsDelete(DynActionForm form, Connection con) Deletes a news itemorg.apache.struts.action.ActionForwardnewsEdit(DynActionForm form, Connection con) Loads a news item for editingorg.apache.struts.action.ActionForwardnewsGet(DynActionForm form, Connection con) Marks a news item as read and returns its contentorg.apache.struts.action.ActionForwardnewsList(DynActionForm form, Connection con) Returns the list of news for the current user, filtered by read state and textorg.apache.struts.action.ActionForwardnewsSetAllRead(DynActionForm form, Connection con) Marks all news of the current user as readorg.apache.struts.action.ActionForwardnewsSetRead(DynActionForm form, Connection con) Sets the read state of a single news itemorg.apache.struts.action.ActionForwardnewsUpdate(DynActionForm form, Connection con) Creates or updates a news item or a personal messageMethods inherited from class BaseAction
checkModified, dispatchMethod, getParameter, html, html, json, json, permissionCheck, restoreRequestParams, unspecified, unspecified, updatePersonalizationMethods inherited from class org.apache.struts.actions.DispatchAction
cancelled, execute, getMethod, getMethodName, unspecifiedMethods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
-
Field Details
-
UNREAD_NEWS_PERSONAL_KEY
Personalization key for the list of unread news IDs- See Also:
-
-
Constructor Details
-
NewsAction
public NewsAction()Default constructor
-
-
Method Details
-
newsUpdate
public org.apache.struts.action.ActionForward newsUpdate(DynActionForm form, Connection con) throws Exception Creates or updates a news item or a personal message- Parameters:
form- request formcon- database connection- Returns:
- JSON response
- Throws:
Exception- on any error
-
newsEdit
public org.apache.struts.action.ActionForward newsEdit(DynActionForm form, Connection con) throws Exception Loads a news item for editing- Parameters:
form- request formcon- database connection- Returns:
- HTML view forward
- Throws:
Exception- on any error
-
newsList
public org.apache.struts.action.ActionForward newsList(DynActionForm form, Connection con) throws Exception Returns the list of news for the current user, filtered by read state and text- Parameters:
form- request formcon- database connection- Returns:
- HTML view forward
- Throws:
Exception- on any error
-
newsGet
public org.apache.struts.action.ActionForward newsGet(DynActionForm form, Connection con) throws Exception Marks a news item as read and returns its content- Parameters:
form- request formcon- database connection- Returns:
- HTML view forward
- Throws:
Exception- on any error
-
newsSetRead
public org.apache.struts.action.ActionForward newsSetRead(DynActionForm form, Connection con) throws Exception Sets the read state of a single news item- Parameters:
form- request formcon- database connection- Returns:
- JSON response
- Throws:
Exception- on any error
-
newsSetAllRead
public org.apache.struts.action.ActionForward newsSetAllRead(DynActionForm form, Connection con) throws Exception Marks all news of the current user as read- Parameters:
form- request formcon- database connection- Returns:
- JSON response
- Throws:
Exception- on any error
-
newsDelete
public org.apache.struts.action.ActionForward newsDelete(DynActionForm form, Connection con) throws Exception Deletes a news item- Parameters:
form- request formcon- database connection- Returns:
- JSON response
- Throws:
Exception- on any error
-