Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.bea.netuix.servlets.manager.communities
Class CommunityRedirectionHelper

    java.lang.Object
      com.bea.netuix.servlets.manager.communities.CommunityRedirectionHelper

    public class CommunityRedirectionHelper

extends Object

The `CommunityRedirectionHelper` contains methods useful for redirecting to community error or registration pages, as well as methods for determining contextual information on a community error or registration page.

The overview of community functionality contains a description of the community framework.

Field Summary
`static int` | `REDIRECTION_TYPE_COMMUNITY_DEACTIVATED` The code indicating a redirection due to the community being deactivated.
`static int` | `REDIRECTION_TYPE_MEMBER_DEACTIVATED` The code indicating a redirection due to the member being deactivated.
`static int` | `REDIRECTION_TYPE_MEMBERSHIP_DEACTIVATED` The code indicating a redirection due to the membership being deactivated.
`static int` | `REDIRECTION_TYPE_NO_PUBLIC_ACCESS` The code indicating a redirection due to the community not having public access.
`static int` | `REDIRECTION_TYPE_REGISTRATION` The code indicating a redirection to a registration page.
`static int` | `REDIRECTION_TYPE_UNKNOWN` The code indicating a redirection due to unknown reasons.

Method Summary
`GenericURL` | `addCommunityRedirectionParameters(GenericURL url)` Adds parameters to a `GenericURL` object (the superclass of `PostbackURL`, `WindowURL` and others) to re-encode community redirection state so that the `CommunityRedirectionHelper` can be used on subsequent page renders.
`static GenericURL` | `generateRegistrationPageUrl(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, CommunityDefinition community)` Generates a URL to the registration page for the specified community.
`static CommunityRedirectionHelper` | `getCommunityRedirectionHelper(javax.servlet.http.HttpServletRequest request)` A convenience method for returning the `CommunityRedirectionHelper` object associated with the specified Request.
`CommunityContext` | `getRedirectingCommunityContext()` Retrieves the `CommunityContext` for the community which caused a redirection to the current page, if applicable.
`String` | `getRedirectingErrorMessage()` Returns a message appropriate for the redirection type that caused the redirection leading to this page render.
`Invitation` | `getRedirectingInvitation()` Returns the invitation (encoded through the validation key in the registration page URL) behind this redirection, if one exists.
`int` | `getRedirectingTypeCode()` Retrieves the type code (one of the REDIRECTION_TYPE constants) for the underlying reason that caused the redirection to this page render.
`String` | `getRedirectingURL()` Returns the requested URL which caused the redirection to the current page, if such a URL exists.
`static String` | `getTypeMessage(int typeCode)` Retrieves the message appropriate for the specified redirection type.
`boolean` | `isRedirectionCommunityDeactivated()` Returns true if the current page render is the result of a community redirection for community deactivation.
`boolean` | `isRedirectionMemberDeactivated()` Returns true if the current page render is the result of a community redirection for member deactivation.
`boolean` | `isRedirectionMembershipDeactivated()` Returns true if the current page render is the result of a community redirection for membership deactivation.
`boolean` | `isRedirectionNoPublicAccess()` Returns true if the current page render is the result of a community redirection because the community has no public access.
`boolean` | `isRedirectionRegistration()` Returns true if the current page render is the result of a community redirection for registration.

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

Field Detail

### REDIRECTION_TYPE_REGISTRATION

    public static final int REDIRECTION_TYPE_REGISTRATION

  The code indicating a redirection to a registration page.

  See Also
    Constants Summary

### REDIRECTION_TYPE_COMMUNITY_DEACTIVATED

    public static final int REDIRECTION_TYPE_COMMUNITY_DEACTIVATED

  The code indicating a redirection due to the community being deactivated.

  See Also
    Constants Summary

### REDIRECTION_TYPE_MEMBER_DEACTIVATED

    public static final int REDIRECTION_TYPE_MEMBER_DEACTIVATED

  The code indicating a redirection due to the member being deactivated.

  See Also
    Constants Summary

### REDIRECTION_TYPE_MEMBERSHIP_DEACTIVATED

    public static final int REDIRECTION_TYPE_MEMBERSHIP_DEACTIVATED

  The code indicating a redirection due to the membership being deactivated.

  See Also
    Constants Summary

### REDIRECTION_TYPE_NO_PUBLIC_ACCESS

    public static final int REDIRECTION_TYPE_NO_PUBLIC_ACCESS

  The code indicating a redirection due to the community not having public access.

  See Also
    Constants Summary

### REDIRECTION_TYPE_UNKNOWN

    public static final int REDIRECTION_TYPE_UNKNOWN

  The code indicating a redirection due to unknown reasons.

  See Also
    Constants Summary

Method Detail

### getCommunityRedirectionHelper

    public static CommunityRedirectionHelper getCommunityRedirectionHelper(javax.servlet.http.HttpServletRequest request)

  A convenience method for returning the `CommunityRedirectionHelper` object associated with the specified Request. If the page currently being rendered is not the result of a community redirect (caused by community / member / membership deactivation, no public access to a community, or a need to register) this method will return `null`.

  Parameters
    `request` - the `HttpServletRequest`.
  Returns
    the `CommunityRedirectionHelper` object associated with the request, if the current page render is the result of a redirection from a community, or `null` if no redirection took place.

### getRedirectingCommunityContext

    public CommunityContext getRedirectingCommunityContext()

  Retrieves the `CommunityContext` for the community which caused a redirection to the current page, if applicable. When the user is redirected to a community error or registration page, this method can be used from the error or registration page to determine which community the user attempted to access.

  Returns
    The `CommunityContext` for the community which triggered the redirection to the current page, if applicable. This is only applicable when the user has been redirected to a community error or registration page. When not applicable, `null` is returned.

### getRedirectingInvitation

    public Invitation getRedirectingInvitation()

  Returns the invitation (encoded through the validation key in the registration page URL) behind this redirection, if one exists.

  Returns
    the invitation behind this redirection, if one exists, `null` otherwise.

### getRedirectingURL

    public String getRedirectingURL()

  Returns the requested URL which caused the redirection to the current page, if such a URL exists. This URL includes all request parameters sent with the original request encoded as a GET type parameters.

  Returns
    the requested URL which caused the redirection to the current page. This URL includes all request parameters sent with the original request encoded as a GET type parameters. It may be `null` if there is no redirecting page.

### getRedirectingTypeCode

    public int getRedirectingTypeCode()

  Retrieves the type code (one of the REDIRECTION_TYPE constants) for the underlying reason that caused the redirection to this page render.

  Returns
    one of the REDIRECTION_TYPE constants.

### isRedirectionRegistration

    public boolean isRedirectionRegistration()

  Returns true if the current page render is the result of a community redirection for registration.

  Returns
    true if the current page render is the result of a community redirection for registration.

### isRedirectionCommunityDeactivated

    public boolean isRedirectionCommunityDeactivated()

  Returns true if the current page render is the result of a community redirection for community deactivation.

  Returns
    true if the current page render is the result of a community redirection for community deactivation.

### isRedirectionMemberDeactivated

    public boolean isRedirectionMemberDeactivated()

  Returns true if the current page render is the result of a community redirection for member deactivation.

  Returns
    true if the current page render is the result of a community redirection for member deactivation.

### isRedirectionMembershipDeactivated

    public boolean isRedirectionMembershipDeactivated()

  Returns true if the current page render is the result of a community redirection for membership deactivation.

  Returns
    true if the current page render is the result of a community redirection for membership deactivation.

### isRedirectionNoPublicAccess

    public boolean isRedirectionNoPublicAccess()

  Returns true if the current page render is the result of a community redirection because the community has no public access.

  Returns
    true if the current page render is the result of a community redirection beacause the community has no public access.

### getRedirectingErrorMessage

    public String getRedirectingErrorMessage()

  Returns a message appropriate for the redirection type that caused the redirection leading to this page render.

  Returns
    a message suitable for use as an error or exception message for the underlying reason this redirection occured.

### addCommunityRedirectionParameters

    public GenericURL addCommunityRedirectionParameters(GenericURL url)

  Adds parameters to a `GenericURL` object (the superclass of `PostbackURL`, `WindowURL` and others) to re-encode community redirection state so that the `CommunityRedirectionHelper` can be used on subsequent page renders.

  Parameters
    `url` - the URL object to add parameters to.
  Returns
    the same URL object that was passed in.
  See Also
    `GenericURL`, `JspContentURL`, `PageURL`, `PostbackURL`, `ResourceURL`, `StandalonePortletURL`, `WindowURL`

### getTypeMessage

    public static String getTypeMessage(int typeCode)

  Retrieves the message appropriate for the specified redirection type.

  Parameters
    `typeCode` - one of thr REDIRECTION_TYPE constants.
  Returns
    a message suitable for use as an error or exception message for the specified type code.

### generateRegistrationPageUrl

    public static GenericURL generateRegistrationPageUrl(javax.servlet.http.HttpServletRequest request,
                                                         javax.servlet.http.HttpServletResponse response,
                                                         CommunityDefinition community)

  Generates a URL to the registration page for the specified community. Please note that:
  - not all communities may have registration page URLs specified (this method returns null in this case)
  - this method simply converts the partial registration page URI specified in the `CommunityDefinition` object into a full, valid URL. It does not check to see whether the community has public registration enabled. It may generate a URL which is inappropriate to display for security or access reasons. For this reason, it is always safest to have the registration page check to make sure registration is appropriate for the community before it creates a membership.

  Parameters
    `request` - the `HttpServletRequest`.
    `response` - the `HttpServletResponse`.
    `community` - the `CommunityDefinition` for the community.
  Returns
    a URL to the registration page for the specified community, if one has been specified, null if not. The URL will contain all parameters needed to use the `CommunityRedirectionHelper` class from the registration page.

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

Copyright © 2000, 2009, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
Other names may be trademarks of their respective owners.