Package fr.paris.lutece.portal.web.style
Class StylesJspBean
java.lang.Object
fr.paris.lutece.portal.web.admin.AdminFeaturesPageJspBean
fr.paris.lutece.portal.web.admin.PluginAdminPageJspBean
fr.paris.lutece.portal.util.mvc.admin.MVCAdminJspBean
fr.paris.lutece.portal.web.style.StylesJspBean
- All Implemented Interfaces:
Serializable
@RequestScoped
@Named
@Controller(controllerJsp="ManageStyles.jsp",
controllerPath="jsp/admin/style/",
right="XMLTRANSFORMER_STYLES_MANAGEMENT",
securityTokenEnabled=true)
public class StylesJspBean
extends fr.paris.lutece.portal.util.mvc.admin.MVCAdminJspBean
This class provides the user interface to manage Styles features
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoCreateStyle(@Valid Style style, fr.paris.lutece.portal.util.mvc.binding.BindingResult bindingResult, fr.paris.lutece.portal.web.cdi.mvc.Models model, jakarta.servlet.http.HttpServletRequest request) Handles the creation of a new style by validating the form inputs, checking for conflicts, and persisting the style if valid.doModifyStyle(@Valid Style style, int nStyleId, fr.paris.lutece.portal.util.mvc.binding.BindingResult bindingResult, fr.paris.lutece.portal.web.cdi.mvc.Models model, jakarta.servlet.http.HttpServletRequest request) Processes the update of a style by validating the form inputs, checking for conflicts, and persisting the modifications if valid.doRemoveStyle(int nId, jakarta.servlet.http.HttpServletRequest request) Processes the deletion of a style identified by its id.getConfirmRemoveStyle(int nId, jakarta.servlet.http.HttpServletRequest request) Returns the confirmation page for removing a style identified by its id.getCreateStyle(fr.paris.lutece.portal.web.cdi.mvc.Models model) Returns the create form of a new stylegetModifyStyle(int nStyleId, fr.paris.lutece.portal.web.cdi.mvc.Models model) Returns the form to update a style identified by its id.getStylesManagement(fr.paris.lutece.portal.web.cdi.mvc.Models model, jakarta.servlet.http.HttpServletRequest request) Displays the list of styles in the management view.Methods inherited from class fr.paris.lutece.portal.util.mvc.admin.MVCAdminJspBean
processControllerMethods inherited from class fr.paris.lutece.portal.web.admin.PluginAdminPageJspBean
getPlugin, initMethods inherited from class fr.paris.lutece.portal.web.admin.AdminFeaturesPageJspBean
getAdminPage, getFeatureIcon, getHomeUrl, getLocale, getPageTitle, getSecurityTokenService, getUser, setFeatureGroup, setFeatureIcon, setPageTitleProperty, validate, validate, validate
-
Field Details
-
RIGHT_MANAGE_STYLE
Right to manage styles- See Also:
-
PORTLET_TYPE
- See Also:
-
STYLE_ID
- See Also:
-
STYLE_NAME
- See Also:
-
STYLES
- See Also:
-
PORTAL_COMPONENT
- See Also:
-
-
Constructor Details
-
StylesJspBean
public StylesJspBean()
-
-
Method Details
-
getStylesManagement
@View(value="manageStyles", defaultView=true) public String getStylesManagement(fr.paris.lutece.portal.web.cdi.mvc.Models model, jakarta.servlet.http.HttpServletRequest request) Displays the list of styles in the management view.- Parameters:
model- the model used to pass attributes to the viewrequest- the HTTP request- Returns:
- the HTML code of the styles management page
-
getCreateStyle
@View(value="getCreateStyle", securityTokenAction="createStyle") public String getCreateStyle(fr.paris.lutece.portal.web.cdi.mvc.Models model) Returns the create form of a new style- Parameters:
model- The Models- Returns:
- The html code for the create form of a new style
-
doCreateStyle
@Action("createStyle") public String doCreateStyle(@Valid @Valid Style style, fr.paris.lutece.portal.util.mvc.binding.BindingResult bindingResult, fr.paris.lutece.portal.web.cdi.mvc.Models model, jakarta.servlet.http.HttpServletRequest request) throws fr.paris.lutece.portal.service.admin.AccessDeniedException Handles the creation of a new style by validating the form inputs, checking for conflicts, and persisting the style if valid.- Parameters:
style- the style object bound from the creation formbindingResult- the result of the validation of the style objectmodel- the model used to pass attributes to the viewrequest- the HTTP request- Returns:
- the JSP URL or redirect URL of the process result
- Throws:
fr.paris.lutece.portal.service.admin.AccessDeniedException- if the security token is invalid
-
getModifyStyle
@View(value="getModifyStyle", securityTokenAction="modifyStyle") public String getModifyStyle(int nStyleId, fr.paris.lutece.portal.web.cdi.mvc.Models model) Returns the form to update a style identified by its id.- Parameters:
nStyleId- the identifier of the style to modifymodel- the model used to pass attributes to the view- Returns:
- the HTML code of the update form
-
doModifyStyle
@Action("modifyStyle") public String doModifyStyle(@Valid @Valid Style style, int nStyleId, fr.paris.lutece.portal.util.mvc.binding.BindingResult bindingResult, fr.paris.lutece.portal.web.cdi.mvc.Models model, jakarta.servlet.http.HttpServletRequest request) Processes the update of a style by validating the form inputs, checking for conflicts, and persisting the modifications if valid.- Parameters:
style- the style object bound from the update formnStyleId- the identifier of the style being updatedbindingResult- the result of the validation of the style objectmodel- the model used to pass attributes to the viewrequest- the HTTP request- Returns:
- the JSP URL or redirect URL of the process result
-
getConfirmRemoveStyle
@View(value="getConfirmRemoveStyle", securityTokenAction="removeStyle") public String getConfirmRemoveStyle(int nId, jakarta.servlet.http.HttpServletRequest request) Returns the confirmation page for removing a style identified by its id.- Parameters:
nId- the identifier of the style to removerequest- the HTTP request- Returns:
- the HTML code of the remove confirmation page
-
doRemoveStyle
@Action("removeStyle") public String doRemoveStyle(int nId, jakarta.servlet.http.HttpServletRequest request) Processes the deletion of a style identified by its id.- Parameters:
nId- the identifier of the style to removerequest- the HTTP request- Returns:
- the JSP URL or redirect URL of the process result
-