com.waveset.adapter
Class ResourceManager

java.lang.Object
  extended bycom.waveset.adapter.ResourceManager
All Implemented Interfaces:
WavesetProperties.Listener

public class ResourceManager
extends java.lang.Object
implements WavesetProperties.Listener

A class that provides a catalog of available ResourceAdapter objects. See comments in PolicyManager.


Field Summary
protected static Trace _trace
           
static java.lang.String code_id
           
 
Constructor Summary
ResourceManager()
           
 
Method Summary
static Resource getResourceByClassName(ObjectCache cache, java.lang.String className)
          Map from adapter classname back to resource.
static Resource getResourceByType(ObjectCache cache, java.lang.String typeString)
          Map from type string back to resource.
static Resource getResourceByType(ObjectCache cache, java.lang.String typeString, boolean includeUnmanagedTypes)
          Map from type string back to resource.
static java.util.Map getResourceIconMap(ObjectCache cache)
           
static ResourceManager getResourceManager()
           
static java.lang.String[] getResourcePrototypeNames(ObjectCache cache)
           
static Resource[] getResourcePrototypes(ObjectCache cache)
          Returns a list of the available resource initial instances.
static Resource[] getResourcePrototypes(ObjectCache cache, boolean includeUnmanagedTypes)
          Returns a list of the available resource initial instances.
static java.util.List getResourceTypeNamesInUse(Session s)
           
static Resource[] getResourceTypes()
          Deprecated. as of 3.1, call #getResourcePrototypes()
static java.lang.String[] getResourceTypeStrings()
          Deprecated. - call #getResourcePrototypeNames
static java.lang.String getTypeDisplayString(ObjectCache cache, java.util.Locale locale, java.lang.String type)
           
protected static java.lang.String getTypeDisplayString(ObjectCache cache, java.util.Locale locale, java.lang.String type, boolean bind)
           
static java.lang.String getTypeDisplayString(ObjectCache cache, java.lang.String type)
           
static java.util.Map getTypeNameMap(ObjectCache cache)
           
static Resource loadPrototypeResource(java.lang.String className, boolean allowDeprecation, WavesetResult result)
           
static Resource loadPrototypeResource(java.lang.String className, WavesetResult result)
           
static void main(java.lang.String[] args)
           
 void propertiesFileChanged()
           
static void resetList()
           
static java.lang.String resourcePathToDisplayString(ObjectCache cache, java.lang.String className)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code_id

public static final java.lang.String code_id
See Also:
Constant Field Values

_trace

protected static Trace _trace
Constructor Detail

ResourceManager

public ResourceManager()
Method Detail

getResourceManager

public static ResourceManager getResourceManager()

propertiesFileChanged

public void propertiesFileChanged()
Specified by:
propertiesFileChanged in interface WavesetProperties.Listener

resetList

public static void resetList()

getTypeDisplayString

public static java.lang.String getTypeDisplayString(ObjectCache cache,
                                                    java.lang.String type)

getTypeDisplayString

public static java.lang.String getTypeDisplayString(ObjectCache cache,
                                                    java.util.Locale locale,
                                                    java.lang.String type)

getTypeDisplayString

protected static java.lang.String getTypeDisplayString(ObjectCache cache,
                                                       java.util.Locale locale,
                                                       java.lang.String type,
                                                       boolean bind)

getTypeNameMap

public static java.util.Map getTypeNameMap(ObjectCache cache)

getResourceTypes

public static Resource[] getResourceTypes()
                                   throws WavesetException
Deprecated. as of 3.1, call #getResourcePrototypes()

Returns a list of the available resource initial instances. See PolicyManager for details.

Throws:
WavesetException

getResourcePrototypes

public static Resource[] getResourcePrototypes(ObjectCache cache)
                                        throws WavesetException
Returns a list of the available resource initial instances. See PolicyManager for details.

Throws:
WavesetException

getResourcePrototypes

public static Resource[] getResourcePrototypes(ObjectCache cache,
                                               boolean includeUnmanagedTypes)
                                        throws WavesetException
Returns a list of the available resource initial instances. See PolicyManager for details.

Parameters:
includeUnmanagedTypes - include unmanaged resource prototypes
Throws:
WavesetException

resourcePathToDisplayString

public static java.lang.String resourcePathToDisplayString(ObjectCache cache,
                                                           java.lang.String className)
                                                    throws WavesetException
Throws:
WavesetException

getResourceTypeStrings

public static java.lang.String[] getResourceTypeStrings()
                                                 throws WavesetException
Deprecated. - call #getResourcePrototypeNames

Returns:
a list of internal resource type names. These names should not be displayed.
Throws:
WavesetException

getResourcePrototypeNames

public static java.lang.String[] getResourcePrototypeNames(ObjectCache cache)
Returns:
a list of internal resource type names. These names should not be displayed.

getResourceIconMap

public static java.util.Map getResourceIconMap(ObjectCache cache)
                                        throws WavesetException
Returns:
a map of all known resource related icons for use in tree browser servlets.
Throws:
WavesetException

getResourceTypeNamesInUse

public static java.util.List getResourceTypeNamesInUse(Session s)
Returns:
the distinct set of resource type names that are in use by actual resource instances.

getResourceByType

public static Resource getResourceByType(ObjectCache cache,
                                         java.lang.String typeString)
                                  throws WavesetException
Map from type string back to resource. This will return a resource made up of the prototype xml from the resource adapter so it is good for default values that you want for a New... operation.

Throws:
WavesetException

getResourceByType

public static Resource getResourceByType(ObjectCache cache,
                                         java.lang.String typeString,
                                         boolean includeUnmanagedTypes)
                                  throws WavesetException
Map from type string back to resource. This will return a resource made up of the prototype xml from the resource adapter so it is good for default values that you want for a New... operation.

Parameters:
includeUnmanagedTypes - also search through unmanaged resource prototypes for a match
Throws:
WavesetException

getResourceByClassName

public static Resource getResourceByClassName(ObjectCache cache,
                                              java.lang.String className)
                                       throws WavesetException
Map from adapter classname back to resource. This will return a resource made up of the prototype xml from the resource adapter so it is good for default values that you want for a New... operation.

Throws:
WavesetException

loadPrototypeResource

public static Resource loadPrototypeResource(java.lang.String className,
                                             WavesetResult result)

loadPrototypeResource

public static Resource loadPrototypeResource(java.lang.String className,
                                             boolean allowDeprecation,
                                             WavesetResult result)

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Throws:
java.lang.Exception