Class SuggestionBoxWebController
- java.lang.Object
-
- org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
-
- org.silverpeas.core.web.mvc.webcomponent.WebComponentController<SuggestionBoxWebRequestContext>
-
- org.silverpeas.components.suggestionbox.control.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSuggestionBoxWebController.ViewContextA context on the viewing of suggestions.
-
Field Summary
Fields Modifier and Type Field Description static StringSUGGESTION_LIST_ARRAYPANE_IDENTIFIER
-
Constructor Summary
Constructors Constructor Description SuggestionBoxWebController(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)Standard Session Controller Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddSuggestion(SuggestionBoxWebRequestContext context)Adds a new suggestion into the current suggestion box.voidapproveSuggestion(SuggestionBoxWebRequestContext context)protected voidbeforeRequestProcessing(SuggestionBoxWebRequestContext context)voiddeleteSuggestion(SuggestionBoxWebRequestContext context)voideditSuggestion(SuggestionBoxWebRequestContext context)Asks for editing an existing suggestion.voidhome(SuggestionBoxWebRequestContext context)Prepares the rendering of the home page.voidlistAllSuggestions(SuggestionBoxWebRequestContext context)Prepares the rendering of the all suggestions screen.voidlistCurrentUserSuggestions(SuggestionBoxWebRequestContext context)Asks for viewing the suggestions proposed by the current user.voidlistPublishedSuggestions(SuggestionBoxWebRequestContext context)Prepares the rendering of the published suggestions screen.voidlistSuggestionsInPendingValidation(SuggestionBoxWebRequestContext context)Asks for viewing the suggestions in pending validation.org.silverpeas.core.web.mvc.webcomponent.NavigationmodifyEdito(SuggestionBoxWebRequestContext context)Asks for the modification of the edito of the current suggestion box.voidnewSuggestion(SuggestionBoxWebRequestContext context)Asks for purposing a new suggestion.protected voidonInstantiation(SuggestionBoxWebRequestContext context)voidpublishSuggestion(SuggestionBoxWebRequestContext context)voidrefuseSuggestion(SuggestionBoxWebRequestContext context)voidsearchResult(SuggestionBoxWebRequestContext context)Handles the incoming from a search result URL.voidsetIsUserSubscribed(SuggestionBoxWebRequestContext context)Sets into request attributes the isUserSubscribed constant.voidupdateSuggestion(SuggestionBoxWebRequestContext context)Updates the specified suggestion in the current suggestion box.voidviewSuggestion(SuggestionBoxWebRequestContext context)Asks for viewing the suggestion identified by the identifier specified in the URL.-
Methods inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, close, getClipboardErrorMessage, getClipboardExceptionError, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getHighestSilverpeasUserRole, getIcon, getLanguage, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoles, getZoneId, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardSelectedElement, setComponentRootName, setSpaceModeMaintenance
-
-
-
-
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 profilecomponentContext- The component's profile
-
-
Method Detail
-
onInstantiation
protected void onInstantiation(SuggestionBoxWebRequestContext context)
- Specified by:
onInstantiationin classorg.silverpeas.core.web.mvc.webcomponent.WebComponentController<SuggestionBoxWebRequestContext>
-
beforeRequestProcessing
protected void beforeRequestProcessing(SuggestionBoxWebRequestContext context)
- Overrides:
beforeRequestProcessingin classorg.silverpeas.core.web.mvc.webcomponent.WebComponentController<SuggestionBoxWebRequestContext>
-
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)
-
-