com.beasys.commerce.content.admin
Class  LinkBuilder
java.lang.Object
  |
  +--com.beasys.commerce.content.admin.LinkBuilder
- public class LinkBuilder
- extends java.lang.Object
  
A utility class to help building the URLs in the Content Management
 admin screen.
 
This will look for all entries in weblogiccommerce.properties 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 relative to
 http://<server>:<port>/tools/. It is recommended
 that absolute paths be used.
 
 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
| 
Inner Class Summary | 
static class | 
LinkBuilder.LinkInfo
 
          A data structure to store the link information. | 
 
 
| 
Method Summary | 
static LinkBuilder.LinkInfo | 
getLinkInfo(java.lang.String name)
 
          Get the link info for a given name. | 
static LinkBuilder.LinkInfo | 
getLinkInfo(java.lang.String name,
            javax.servlet.http.HttpServletRequest req)
 
          Get the link info for a given name, with the ${varname}'s replaced by
 the information in the request. | 
static java.util.Iterator | 
getLinkNames()
 
          Get a sorted iterator of the link names. | 
 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
LinkBuilder
public LinkBuilder()
getLinkNames
public static java.util.Iterator getLinkNames()
- Get a sorted iterator of the link names.
 
getLinkInfo
public static LinkBuilder.LinkInfo getLinkInfo(java.lang.String name)
- 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(java.lang.String name,
                                               javax.servlet.http.HttpServletRequest req)
- 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.
 
 
 
Copyright © 2001 BEA Systems, Inc. All Rights Reserved