com.sas.edir.webapp
Class Registry

java.lang.Object
  |
  +--com.sas.edir.webapp.Registry

public abstract class Registry
extends java.lang.Object

The Registry is a set of properties that matches contnet with available resources. It pairs a property with a resource available on a web server. This property can be augmented by an Object's type, so that data specific to different objects can be mapped to different resources.

Version:
1.0
Author:
SAS

Constructor Summary
Registry(java.util.Properties properties)
          Builds a Registry.
 
Method Summary
 java.util.Properties getRegistryProperties()
          Returns all properties in the Registry
 java.lang.String getRegistryProperty(java.lang.Object object, java.lang.String property)
          Performs a registry lookup for a given property.
 java.lang.String getRegistryProperty(java.lang.String property)
          Performs a registry lookup for a given property.
 java.lang.String getRegistryProperty(java.lang.String type, java.lang.String property)
          Performs a registry lookup for a given property.
protected abstract  java.lang.String getType(java.lang.Object object)
          An abstract method used to get an object's type.
 void list(java.io.PrintWriter pw)
          Display the contents of a Registry via a Printwriter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Registry

public Registry(java.util.Properties properties)
Builds a Registry.
Parameters:
properties - The Properties object used to build the Registry.
Method Detail

list

public void list(java.io.PrintWriter pw)
Display the contents of a Registry via a Printwriter.
Parameters:
pw - The PrintWriter used for displaying the Registry.

getRegistryProperty

public final java.lang.String getRegistryProperty(java.lang.String type,
                                                  java.lang.String property)
Performs a registry lookup for a given property. type information is optional. If type is null, then the lookup is performed for that property under type = "unknown".
Parameters:
type - A String that helps specify what kind of resource to look for.
property - A String that tells which specific property to lookup.
Returns:
A String value representing a web resource

getRegistryProperty

public final java.lang.String getRegistryProperty(java.lang.Object object,
                                                  java.lang.String property)
Performs a registry lookup for a given property. The object's type is obtained and a Registry lookup is performed.
Parameters:
object - The Object whose resource is being looked up.
property - A String that, when combined with the object's type, defines the lookup being done.
Returns:
A String value representing a web resource.

getRegistryProperty

public final java.lang.String getRegistryProperty(java.lang.String property)
Performs a registry lookup for a given property. A Registry lookup is performed using the String passed in.
Parameters:
property - A String that defines the lookup being done.
Returns:
A String value representing a web resource.

getRegistryProperties

public final java.util.Properties getRegistryProperties()
Returns all properties in the Registry
Returns:
A Properties object

getType

protected abstract java.lang.String getType(java.lang.Object object)
An abstract method used to get an object's type. Exactly what is an object's "type" is implementation dependent.
Parameters:
object - The Object whose type is being derived.
Returns:
A String representation of the Object's type.