All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.wizards.builder.resolver.ResolverManager

java.lang.Object
   |
   +----com.sun.wizards.builder.resolver.ResolverManager

public class ResolverManager
extends Object
implements ResourceResolver
This object manages a collection of ResourceResolver objects, using them in an orderly fasion to resolve resources. The order ResourceResolvers are added to this manager is the same order used to resolve resources. For example, if you create an empty ResolverManager and add ResourceResolver A, then B, then during resource resolution (i.e. the resolveResource() method was called on this manager), ResourceResolver A is queried first, and if it returns a non-null value for the resource, ResourceResolver B is never queried. If instead, A returned null, resolver B would be queried, and so on.


Constructor Index

 o ResolverManager()

Method Index

 o addResolver(ResourceResolver)
Adds a ResourceResolver to this manager.
 o removeResolver()
Removes the most recently-added ResourceResolver from this collection.
 o removeResolver(ResourceResolver)
Removes a specific ResourceResolver from this collection.
 o resolveResource(String, String, byte[])
Resolves resources from some source.

Constructors

 o ResolverManager
 public ResolverManager()

Methods

 o addResolver
 public void addResolver(ResourceResolver resolver)
Adds a ResourceResolver to this manager. The order you add ResourceResolvers to this manager determines which order they are searched, in a FIFO-fasion (i.e. The first ResourceResolver to be added to this manager will be the first one used to attempt to resolve a resource) If the resolver already exists in this manager, another one is not added.

Parameters:
resolver - The ResourceResolver to add to this collection
 o removeResolver
 public boolean removeResolver(ResourceResolver resolver)
Removes a specific ResourceResolver from this collection.

Parameters:
resolver - The desired resource resolver to remove.
Returns:
true if the argument was a component of this manager; false otherwise.
 o removeResolver
 public ResourceResolver removeResolver()
Removes the most recently-added ResourceResolver from this collection.

Returns:
The removed ResourceResolver, or null if no ResourceResolvers have been added.
 o resolveResource
 public ResourceInputStream resolveResource(String type,
                                            String name,
                                            byte extData[])
Resolves resources from some source. This method provides the core functionality of the ResourceResolver.

Parameters:
type - The type of the requested resource
name - The name of the requested resource in dot notation (i.e. "com.sun.wizards.core.Task")
extData - The extra data associated with this resource
Returns:
The requested resource, or null if the resource could not be found

All Packages  Class Hierarchy  This Package  Previous  Next  Index