Package org.silverpeas.components.community.control

# Class CommunityWebController

java.lang.Object
org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController
org.silverpeas.core.web.mvc.webcomponent.WebComponentController<CommunityWebRequestContext>
org.silverpeas.components.community.control.CommunityWebController

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

@WebComponentController("community") public class CommunityWebController extends org.silverpeas.core.web.mvc.webcomponent.WebComponentController<CommunityWebRequestContext>

The Web Component Controller of the application.

It takes in charge, per user, the web navigation of the user in the application. It is a session scoped bean; it is instantiated for each user session.

See Also:
  - Serialized Form

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `HISTORY_ARRAYPANE_IDENTIFIER`
  `static final String`
  `MEMBER_LIST_ARRAYPANE_IDENTIFIER`

  ### Fields inherited from class org.silverpeas.core.web.mvc.controller.AbstractComponentSessionController

  `context`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CommunityWebController(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)`
  Standard Web Controller Constructor.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `appHomepage(CommunityWebRequestContext context)`
  Prepares the rendering of the home page.
  `protected void`
  `beforeRequestProcessing(CommunityWebRequestContext context)`
  `org.silverpeas.core.web.mvc.webcomponent.Navigation`
  `editSpaceHomePage(CommunityWebRequestContext context)`
  `void`
  `endMembershipOf(CommunityWebRequestContext context)`
  `void`
  `getHistory(CommunityWebRequestContext context)`
  `void`
  `home(CommunityWebRequestContext context)`
  Prepares the rendering of the home page.
  `void`
  `join(CommunityWebRequestContext context)`
  `void`
  `leave(CommunityWebRequestContext context)`
  `void`
  `listMembers(CommunityWebRequestContext context)`
  `protected void`
  `onInstantiation(CommunityWebRequestContext context)`
  This method is called one times once this web component controller is instantiated for a given user.
  `void`
  `setDisplayCharterOnSpaceHomepage(CommunityWebRequestContext context)`
  `void`
  `spaceHomepageProxy(CommunityWebRequestContext context)`
  Prepares the rendering of the home page.
  `void`
  `validate(CommunityWebRequestContext context)`

  ### 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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### MEMBER_LIST_ARRAYPANE_IDENTIFIER

    public static final String MEMBER_LIST_ARRAYPANE_IDENTIFIER
    See Also:
      - Constant Field Values

  - ### HISTORY_ARRAYPANE_IDENTIFIER

    public static final String HISTORY_ARRAYPANE_IDENTIFIER
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### CommunityWebController

    public CommunityWebController(org.silverpeas.core.web.mvc.controller.MainSessionController mainSessionCtrl, org.silverpeas.core.web.mvc.controller.ComponentContext componentContext)
    Standard Web Controller Constructor.
    Parameters:
      `mainSessionCtrl` - the main user session controller.
      `componentContext` - The component's context.

- ## Method Details

  - ### onInstantiation

    protected void onInstantiation(CommunityWebRequestContext context)
    This method is called one times once this web component controller is instantiated for a given user. You can perform here some specific treatments here. For example, you can register Web navigation listeners that will be invoked at each navigation step change. For simple web navigation, this method is usually empty.
    Specified by:
      `onInstantiation` in class `org.silverpeas.core.web.mvc.webcomponent.WebComponentController<CommunityWebRequestContext>`
    Parameters:
      `context` - the web request context.

  - ### beforeRequestProcessing

    protected void beforeRequestProcessing(CommunityWebRequestContext context)
    Overrides:
      `beforeRequestProcessing` in class `org.silverpeas.core.web.mvc.webcomponent.WebComponentController<CommunityWebRequestContext>`

  - ### home

    @GET @Path("Main") @Homepage @RedirectToInternal("{view}?ComponentMainPage={isComponentMainPage}") public void home(CommunityWebRequestContext context)
    Prepares the rendering of the home page.
    Parameters:
      `context` - the context of the incoming request.

  - ### appHomepage

    @GET @Path("appHomepage") @RedirectToInternalJsp("main.jsp") public void appHomepage(CommunityWebRequestContext context)
    Prepares the rendering of the home page.
    Parameters:
      `context` - the context of the incoming request.

  - ### setDisplayCharterOnSpaceHomepage

    @POST @Path("parameters/displayCharterOnSpaceHomepage") @Produces("application/json") public void setDisplayCharterOnSpaceHomepage(CommunityWebRequestContext context)

  - ### spaceHomepageProxy

    @GET @Path("spaceHomepageProxy") @RedirectTo("{path}?SpaceId={spaceId}") public void spaceHomepageProxy(CommunityWebRequestContext context)
    Prepares the rendering of the home page.
    Parameters:
      `context` - the context of the incoming request.

  - ### listMembers

    @GET @Path("members") @RedirectToInternalJsp("members.jsp") @NavigationStep(identifier="memberListNavStepIdentifier") @LowestRoleAccess(READER) public void listMembers(CommunityWebRequestContext context)

  - ### join

    @POST @Path("members/join") @Produces("application/json") public void join(CommunityWebRequestContext context)

  - ### validate

    @POST @Path("members/join/validate/{userId}") @Produces("application/json") @LowestRoleAccess(ADMIN) public void validate(CommunityWebRequestContext context)

  - ### endMembershipOf

    @POST @Path("members/leave/{userId}") @LowestRoleAccess(ADMIN) @Produces("application/json") public void endMembershipOf(CommunityWebRequestContext context)

  - ### leave

    @POST @Path("members/leave") @LowestRoleAccess(READER) @Produces("application/json") public void leave(CommunityWebRequestContext context)

  - ### getHistory

    @GET @Path("members/history") @RedirectToInternalJsp("history.jsp") @NavigationStep(identifier="historyViewNavStepIdentifier") @LowestRoleAccess(ADMIN) public void getHistory(CommunityWebRequestContext context)

  - ### editSpaceHomePage

    @GET @Path("spaceHomepage/edit") public org.silverpeas.core.web.mvc.webcomponent.Navigation editSpaceHomePage(CommunityWebRequestContext context)