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

## com.bea.p13n.content.admin
Class LinkBuilder

    java.lang.Object
      com.bea.p13n.content.admin.LinkBuilder

public class LinkBuilder
extends Object

A utility class to help building the URLs in the Content Management admin screen.

This will look for all entries in p13n-content-admin.properties in the current directory (override via the "p13n-content-admin.properties" system property) of the form:
`content.admin.links.<name>.link.url=...`
From that, it will take the <name> and look for entries like:
`content.admin.links.<name>.link.text=...
content.admin.links.<name>.link.target=...
content.admin.links.<name>.image.url=...
content.admin.links.<name>.image.text=...
content.admin.links.<name>.image.width=...
content.admin.links.<name>.image.height=...
`
`content.admin.links.<name>.link.url` will be the URL of the link to place in the content admin screen.
`content.admin.links.<name>.link.text` will be the text of the link. If this is not specified, it defaults to <name>.
`content.admin.links.<name>.link.target` will be the target window/frame name of the link. If not specified, none will be used (i.e. will appear in same frame/window as the link).
`content.admin.links.<name>.image.url` is the URL of an image to place to the left of the link. If this is not specified, no image will placed on the admin screen and the other image properties will be ignored.
`content.admin.links.<name>.image.text` is the alternate text for the image. The default is the text of the link.
`content.admin.links.<name>.image.width` is the preferred display width of the image.
`content.admin.links.<name>.image.height` is the preferred display height of the image.

All URLs from the properties file should be at least absolute paths.

All values from the properties file may contain variable references of the form `${varname}`. These variable references will be replaced, at runtime, with the appropriate information from the server. The valid `varnames` are:

- `scheme`: the schema of the server (http, https).
- `host`: the hostname (IP address if hostname unknown) of the server.
- `port`: the port address of the server.
- `remoteUser`: the user name of the remote user, if known.
- `remoteHost`: the hostname (IP address if hostname unknown) of the remote client.
- `remoteIp`: the IP address of the remote client.
- `charSet`: the character encoding of the client, if known.

A `varname` which is not recognized will not be replaced in the value.
The link names will always be returned in alphabetical order (according to VM's default ordering).

Since:
  3.2
See Also:
  `Variables`

Nested Class Summary
`static class` | `LinkBuilder.LinkInfo` Deprecated. A data structure to store the link information.

Constructor Summary
`LinkBuilder()` Deprecated.

Method Summary
`static LinkBuilder.LinkInfo` | `getLinkInfo(String name)` Deprecated. Get the link info for a given name.
`static LinkBuilder.LinkInfo` | `getLinkInfo(String name, HttpServletRequest req)` Deprecated. Get the link info for a given name, with the ${varname}'s replaced by the information in the request.
`static Iterator` | `getLinkNames()` Deprecated. Get a sorted iterator of the link names.
`static boolean` | `hasLinks()` Deprecated. Tell if there are links configured in this appliation.

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

Constructor Detail

### LinkBuilder

    public LinkBuilder()

  Deprecated.

Method Detail

### getLinkInfo

    public static LinkBuilder.LinkInfo getLinkInfo(String name)

  Deprecated.
  Get the link info for a given name.

  Parameters:
    `name` - the link name.
  Returns:
    the LinkInfo, null for unknown name.

### getLinkInfo

    public static LinkBuilder.LinkInfo getLinkInfo(String name,
                                                   HttpServletRequest req)

  Deprecated.
  Get the link info for a given name, with the ${varname}'s replaced by the information in the request.

  Parameters:
    `name` - the link name.
    `req` - the servlet request object
  Returns:
    the LinkInfo, null for unknown name.

### getLinkNames

    public static Iterator getLinkNames()

  Deprecated.
  Get a sorted iterator of the link names.

### hasLinks

    public static boolean hasLinks()

  Deprecated.
  Tell if there are links configured in this appliation.

  Returns:
    true if there are links.

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

Copyright © 2005 BEA Systems, Inc. All Rights Reserved