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

## com.bea.netuix.application.identifier
Class CommunityURI

    java.lang.Object
      com.bea.netuix.application.identifier.CommunityURI

All Implemented Interfaces
  Serializable

    public class CommunityURI

extends Object
implements Serializable

The `CommunityURI` is a convenience object for combining the webapp name, portal path, and desktop path which together uniquely identify a community. This is the most portable way to refer to a specific community (as opposed to a `CommunityDefinitionId`). A `CommunityURI` can be converted to a single String for easier storage or use as a URL parameter and can be reconstituted from the String.

Note that if the context-root for a webapp is "/", the webapp name will be "/" and this will result in a CommunityURI beginning with two slashes. As long as this CommunityURI class is used to encode and decode CommunityURI values from strings, this is not a problem and is handled correctly. However, a URI beginning with two slashes is technically not a valid URI by the definition of a URI.

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

See Also
  Serialized Form

Constructor Summary
`CommunityURI(String webAppName, PortalPath portalPath, DesktopPath desktopPath)` Construct a new CommunityURI.
`CommunityURI(String webAppName, String portalPath, String desktopPath)` Construct a new CommunityURI.

Method Summary
`static CommunityURI` | `createCommunityURI(DesktopDefinitionId desktopDefinitionId)` Creates a `CommunityURI` from the specified `DesktopDefinitionId`.
`static CommunityURI` | `createCommunityURI(String uri)` Creates a CommunityURI object from the specified String, which has the format `webAppName/portalPath/desktopPath` and is of the same format as the String returned by `CommunityURI.toString()`.
`boolean` | `equals(Object o)`
`String` | `getDesktopPath()` Returns the desktop path portion of this `CommunityURI`.
`String` | `getPortalPath()` Returns the portal path portion of this `CommunityURI`.
`String` | `getWebAppName()` Returns the webapp name portion of this `CommunityURI`.
`int` | `hashCode()`
`String` | `toString()` Returns a String representation of this `CommunityURI` object suitable for use with the `CommunityURI.createCommunityUri()` method.

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

Constructor Detail

### CommunityURI

    public CommunityURI(String webAppName,
                        String portalPath,
                        String desktopPath)

  Construct a new CommunityURI.

  Parameters
    `webAppName` - the name of the webapp where the community will reside.
    `portalPath` - the part of the url that identifies this community's portal.
    `desktopPath` - the part of the url that identifies this community's desktop.

### CommunityURI

    public CommunityURI(String webAppName,
                        PortalPath portalPath,
                        DesktopPath desktopPath)

  Construct a new CommunityURI.

  Parameters
    `webAppName` - the name of the webapp where the community will reside.
    `portalPath` - the part of the url that identifies this community's portal.
    `desktopPath` - the part of the url that identifies this community's desktop.

Method Detail

### createCommunityURI

    public static CommunityURI createCommunityURI(String uri)

  Creates a CommunityURI object from the specified String, which has the format `webAppName/portalPath/desktopPath` and is of the same format as the String returned by `CommunityURI.toString()`. It is always safest to use this method only with a String returned by `CommunityURI.toString()`. This method exists to provide a convenient mechanism for passing a `CommunityURI` as a URL parameter or storing it in a database.

  Parameters
    `uri` - the String to create a new CommunityURI from.
  Returns
    a new CommunityURI created from the provided String.
  Throws
    `IllegalArgumentException` - if the `uri` parameter is not appropriately formatted.

### createCommunityURI

    public static CommunityURI createCommunityURI(DesktopDefinitionId desktopDefinitionId)

  Creates a `CommunityURI` from the specified `DesktopDefinitionId`.

  Parameters
    `desktopDefinitionId` - the `DesktopDefinitionId` to create the `CommunityURI` from.
  Returns
    the `CommunityURI` appropriate for the specified `DesktopDefinitionId`

### getWebAppName

    public String getWebAppName()

  Returns the webapp name portion of this `CommunityURI`.

  Returns
    the webapp name portion of this `CommunityURI`.

### getPortalPath

    public String getPortalPath()

  Returns the portal path portion of this `CommunityURI`.

  Returns
    the portal path portion of this `CommunityURI`

### getDesktopPath

    public String getDesktopPath()

  Returns the desktop path portion of this `CommunityURI`.

  Returns
    the desktop path portion of this `CommunityURI`.

### equals

    public boolean equals(Object o)

  Overrides:
    `equals` in class `Object`
  Parameters
    `o` - a `DesktopDefinitionId` object to compare to this `DesktopDefinitionId`.
  Returns
    `true` if this `DesktopDefinitionId` is the same as the `DesktopDefinitionId` object passed in; `false` otherwise.

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`
  Returns
    a hash code value for this object.

### toString

    public String toString()

  Returns a String representation of this `CommunityURI` object suitable for use with the `CommunityURI.createCommunityUri()` method.

  Overrides:
    `toString` in class `Object`

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

Copyright © 2008 BEA Systems, Inc. All Rights Reserved