net.walend.director
Class Director

java.lang.Object
  |
  +--net.walend.director.Director
Direct Known Subclasses:
Director

public class Director
extends java.lang.Object

This static convinience class provides shortcuts to get to singleton classes and nonpersistent classes. It contains an instance of a FancyDirector class.

Since:
20001127
Author:
David Walend

Field Summary
private static FancyDirector director
           
 
Constructor Summary
Director()
           
 
Method Summary
static java.lang.Class getClassForRole(java.lang.String role)
          Return the concrete class to use for this particular interface.
static java.lang.Object getObjectForRole(java.lang.String role)
          Return an instance of an Object that can fulfil the role.
static PropertySource getPropertySource()
          Return the PropertySource.
static java.lang.Object getSingletonForRole(java.lang.String role)
          Return the singleton that can fulfil the role.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

director

private static FancyDirector director
Constructor Detail

Director

public Director()
Method Detail

getClassForRole

public static java.lang.Class getClassForRole(java.lang.String role)
Return the concrete class to use for this particular interface.

Parameters:
role - should match a director. property from the PropertiesSource.
Throws:
ClassForRoleNotFoundException - if the FancyDirector can not map the class to a role.

getObjectForRole

public static java.lang.Object getObjectForRole(java.lang.String role)
Return an instance of an Object that can fulfil the role.

Parameters:
role - should match a director. property from the PropertiesSource.
Throws:
ClassForRoleNotFoundException - if the FancyDirector can not map the class to a role.
CannotCreateException - if the FancyDirector can not construct the object.

getSingletonForRole

public static java.lang.Object getSingletonForRole(java.lang.String role)
Return the singleton that can fulfil the role.

Parameters:
role - should match a director. property from the PropertiesSource.
Throws:
ClassForRoleNotFoundException - if the FancyDirector can not map the class to a role.
CannotCreateException - if the FancyDirector can not construct the object.

getPropertySource

public static PropertySource getPropertySource()
Return the PropertySource.

Throws:
ClassForRoleNotFoundException - if the FancyDirector can not map the class to a role.
CannotCreateException - if the FancyDirector can not construct the object.


Copyright (c) 2000, 2001, David Walend