com.sage.orion.sdata.servlet
Class AbstractResourceFactory

java.lang.Object
  extended by com.sage.orion.sdata.servlet.AbstractResourceFactory
All Implemented Interfaces:
ResourceFactory
Direct Known Subclasses:
ResourceKindFactory

public abstract class AbstractResourceFactory
extends java.lang.Object
implements ResourceFactory

The AbstractResourceFactory class provides a base implementation of ResourceFactory. Each application should provide its own implementation.


Constructor Summary
AbstractResourceFactory()
           
 
Method Summary
 ResourceKind createResource(java.lang.String resourceClassName, ApplicationContext applicationContext, ResourceContext context)
          Creates an instance of the given resource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractResourceFactory

public AbstractResourceFactory()
Method Detail

createResource

public ResourceKind createResource(java.lang.String resourceClassName,
                                   ApplicationContext applicationContext,
                                   ResourceContext context)
Creates an instance of the given resource.

Parameters:
resourceClassName - the name of the class to be instantiated.
applicationContext - the application context in which the instance will operate
context - the generic context in which the instance will operate
Returns:
the newly created resource
Throws:
java.lang.RuntimeException - wrapping one of various checked exceptions (see Constructor.newInstance(java.lang.Object...)), or from the actual ResourceKind constructor if the resource cannot be created.


Copyright © 2011 Sage Software, Inc. All rights reserved.