Class SuggestionBoxWebController

  • All Implemented Interfaces:
    Serializable, org.silverpeas.core.web.mvc.controller.ComponentSessionController, org.silverpeas.core.web.session.SessionCloseable

    @WebComponentController("suggestionBox")
    public class SuggestionBoxWebController
    extends org.silverpeas.core.web.mvc.webcomponent.WebComponentController<SuggestionBoxWebRequestContext>
    See Also:
    Serialized Form
    • Field Detail

      • SUGGESTION_LIST_ARRAYPANE_IDENTIFIER

        public static final String SUGGESTION_LIST_ARRAYPANE_IDENTIFIER
        See Also:
        Constant Field Values
    • Constructor Detail

      • SuggestionBoxWebController

        public SuggestionBoxWebController​(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl,
                                          org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)
        Standard Session Controller Constructor
        Parameters:
        mainSessionCtrl - The user's profile
        componentContext - The component's profile
    • Method Detail

      • home

        @GET
        @Path("Main")
        @Homepage
        @RedirectToInternalJsp("suggestionBox.jsp")
        @InvokeAfter("isUserSubscribed")
        public void home​(SuggestionBoxWebRequestContext context)
        Prepares the rendering of the home page.
        Parameters:
        context - the context of the incoming request.
      • listAllSuggestions

        @GET
        @Path("suggestions/all")
        @NavigationStep(identifier="suggestionListNavStepIdentifier",
                        contextIdentifier="AllSuggestions")
        @RedirectToInternalJsp("suggestionList.jsp")
        public void listAllSuggestions​(SuggestionBoxWebRequestContext context)
        Prepares the rendering of the all suggestions screen.
        Parameters:
        context - the context of the incoming request.
      • listPublishedSuggestions

        @GET
        @Path("suggestions/published")
        @NavigationStep(identifier="suggestionListNavStepIdentifier",
                        contextIdentifier="PublishedSuggestions")
        @RedirectToInternalJsp("suggestionList.jsp")
        public void listPublishedSuggestions​(SuggestionBoxWebRequestContext context)
        Prepares the rendering of the published suggestions screen.
        Parameters:
        context - the context of the incoming request.
      • listSuggestionsInPendingValidation

        @GET
        @Path("suggestions/pending")
        @NavigationStep(identifier="suggestionListNavStepIdentifier",
                        contextIdentifier="SuggestionsInValidation")
        @RedirectToInternalJsp("suggestionList.jsp")
        @LowestRoleAccess(PUBLISHER)
        public void listSuggestionsInPendingValidation​(SuggestionBoxWebRequestContext context)
        Asks for viewing the suggestions in pending validation. It renders an HTML page with all the suggestions waiting for the validation from a publisher.
        Parameters:
        context - the context of the incoming request.
      • listCurrentUserSuggestions

        @GET
        @Path("suggestions/mine")
        @NavigationStep(identifier="suggestionListNavStepIdentifier",
                        contextIdentifier="MySuggestions")
        @RedirectToInternalJsp("suggestionList.jsp")
        @LowestRoleAccess(WRITER)
        public void listCurrentUserSuggestions​(SuggestionBoxWebRequestContext context)
        Asks for viewing the suggestions proposed by the current user. It renders an HTML page with all the suggestions of the current user.
        Parameters:
        context - the context of the incoming request.
      • searchResult

        @GET
        @Path("searchResult")
        @RedirectToInternal("suggestions/{id}")
        public void searchResult​(SuggestionBoxWebRequestContext context)
        Handles the incoming from a search result URL.
        Parameters:
        context - the context of the incoming request.
      • modifyEdito

        @GET
        @Path("edito/modify")
        @LowestRoleAccess(ADMIN)
        public org.silverpeas.core.web.mvc.webcomponent.Navigation modifyEdito​(SuggestionBoxWebRequestContext context)
        Asks for the modification of the edito of the current suggestion box. The modification itself is redirected to the WYSIWYG editor.
        Parameters:
        context - the context of the incoming request.
        Returns:
        the navigation information within which the next resource to which the control will be passed is indicated.
      • setIsUserSubscribed

        @Invokable("isUserSubscribed")
        public void setIsUserSubscribed​(SuggestionBoxWebRequestContext context)
        Sets into request attributes the isUserSubscribed constant.
        Parameters:
        context - the context of the incoming request.
      • newSuggestion

        @GET
        @Path("suggestions/new")
        @RedirectToInternalJsp("suggestionEdit.jsp")
        @LowestRoleAccess(WRITER)
        public void newSuggestion​(SuggestionBoxWebRequestContext context)
        Asks for purposing a new suggestion. It renders an HTML page to input the content of a new suggestion.
        Parameters:
        context - the context of the incoming request.
      • addSuggestion

        @POST
        @Path("suggestions/add")
        @RedirectToInternal("suggestions/{id}")
        @LowestRoleAccess(WRITER)
        public void addSuggestion​(SuggestionBoxWebRequestContext context)
        Adds a new suggestion into the current suggestion box. The suggestion's data are carried within the request's context.
        Parameters:
        context - the context of the incoming request.
      • viewSuggestion

        @GET
        @Path("suggestions/{id}")
        @NavigationStep(identifier="suggestionViewNavStepIdentifier")
        @RedirectToInternalJsp("suggestionView.jsp")
        public void viewSuggestion​(SuggestionBoxWebRequestContext context)
        Asks for viewing the suggestion identified by the identifier specified in the URL. It renders an HTML page with all the information about a given suggestion. If the suggestion isn't published, it can be then modified.
        Parameters:
        context - the context of the incoming request.
      • editSuggestion

        @GET
        @Path("suggestions/{id}/edit")
        @RedirectToInternalJsp("suggestionEdit.jsp")
        @LowestRoleAccess(WRITER)
        public void editSuggestion​(SuggestionBoxWebRequestContext context)
        Asks for editing an existing suggestion. It renders an HTML page to modify the content of the suggestion.
        Parameters:
        context - the context of the incoming request.
      • updateSuggestion

        @POST
        @Path("suggestions/{id}")
        @RedirectToInternal("suggestions/{id}")
        @LowestRoleAccess(WRITER)
        public void updateSuggestion​(SuggestionBoxWebRequestContext context)
        Updates the specified suggestion in the current suggestion box. The suggestion's data are carried within the request's context.
        Parameters:
        context - the context of the incoming request.
      • deleteSuggestion

        @POST
        @Path("suggestions/{id}/delete")
        @RedirectToPreviousNavigationStep
        @LowestRoleAccess(WRITER)
        public void deleteSuggestion​(SuggestionBoxWebRequestContext context)
      • publishSuggestion

        @POST
        @Path("suggestions/{id}/publish")
        @RedirectToPreviousNavigationStep
        @LowestRoleAccess(WRITER)
        public void publishSuggestion​(SuggestionBoxWebRequestContext context)
      • approveSuggestion

        @POST
        @Path("suggestions/{id}/approve")
        @RedirectToPreviousNavigationStep
        @LowestRoleAccess(PUBLISHER)
        public void approveSuggestion​(SuggestionBoxWebRequestContext context)
      • refuseSuggestion

        @POST
        @Path("suggestions/{id}/refuse")
        @RedirectToPreviousNavigationStep
        @LowestRoleAccess(PUBLISHER)
        public void refuseSuggestion​(SuggestionBoxWebRequestContext context)