Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.portlet
Class CommunityAdminURLHelper

    java.lang.Object
      com.bea.portlet.CommunityAdminURLHelper

    public class CommunityAdminURLHelper

extends Object

CommunityAdminURLHelper - has helper methods to add a parameter to a url such that it provides a hint to the framework to retrieve the admin view of a community resource - as opposed to the user's customized view. Note that this hint will only be honored if the user is a "community admin" for the community concerned and the url points to a community.

Constructor Summary
`CommunityAdminURLHelper()`

Method Summary
`static PostbackURL` | `addCommunityAdminParameter(PostbackURL url)` Adds a parameter to a `PostbackURL` with value `parameterValue`.
`static PostbackURL` | `addCommunityAdminParameter(PostbackURL url, boolean parameterValue)` Adds a parameter to a `PostbackURL` with value `parameterValue`.
`static String` | `getCommunityAdminParameterName()` Returns the name of the request parameter.
`static String` | `getCommunitySessionAttributeName(CommunityURI communityURI)` Returns the name of the session attribute used to track if a user is in admin or visitor mode for the community specified by the CommunityURI.
`static boolean` | `isCommunityAdminParamSet(HttpServletRequest request)` Returns `true` if the community admin param is set on the input request, false otherwise
`static boolean` | `isCommunityAdminParamSet(HttpServletRequest request, boolean value)` Returns `true` if the community admin param is set on the input request to the value `value`, false otherwise.
`static boolean` | `isCommunityInAdminMode(HttpServletRequest request, CommunityURI communityURI)` Returns `true` if the current user is using community specified by `CommunityURI` in admin mode.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CommunityAdminURLHelper

    public CommunityAdminURLHelper()

Method Detail

### addCommunityAdminParameter

    public static PostbackURL addCommunityAdminParameter(PostbackURL url,
                                                         boolean parameterValue)

  Adds a parameter to a `PostbackURL` with value `parameterValue`.

  Parameters
    `url` - postback url
    `parameterValue` - `true` if user should act as a community admin, false otherwise
  Returns
    updated `PostbackURL`

### addCommunityAdminParameter

    public static PostbackURL addCommunityAdminParameter(PostbackURL url)

  Adds a parameter to a `PostbackURL` with value `parameterValue`.

  Parameters
    `url` - postback url
  Returns
    updated `PostbackURL`

### getCommunityAdminParameterName

    public static String getCommunityAdminParameterName()

  Returns the name of the request parameter. The value of the parameter has to be "true" or "false".

  Returns
    name of the community admin request parameter

### getCommunitySessionAttributeName

    public static String getCommunitySessionAttributeName(CommunityURI communityURI)

  Returns the name of the session attribute used to track if a user is in admin or visitor mode for the community specified by the CommunityURI. The value of the attribute has to be "true" or "false".

  Parameters
    `communityUri` - `CommunityURI` the session attribute is scoped to
  Returns
    name of the community admin session attribute

### isCommunityAdminParamSet

    public static boolean isCommunityAdminParamSet(HttpServletRequest request)

  Returns `true` if the community admin param is set on the input request, false otherwise

  Parameters
    `request` - the `HttpServletRequest`
  Returns
    `true` if the community admin param is set on the input request, false otherwise

### isCommunityAdminParamSet

    public static boolean isCommunityAdminParamSet(HttpServletRequest request,
                                                   boolean value)

  Returns `true` if the community admin param is set on the input request to the value `value`, false otherwise.

  Parameters
    `request` - request the `HttpServletRequest`
    `value` - expected value
  Returns
    `true` if the community admin param is set on the input request to the value `value`, false otherwise

### isCommunityInAdminMode

    public static boolean isCommunityInAdminMode(HttpServletRequest request,
                                                 CommunityURI communityURI)

  Returns `true` if the current user is using community specified by `CommunityURI` in admin mode.

  Parameters
    `request` - request
    `communityURI` - communityURI
  Returns
    `true` if the current user is using community specified by `CommunityURI` in admin mode

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2006 BEA Systems, Inc. All Rights Reserved