net.dpml.transit
Class SecuredTransitContext

java.lang.Object
  extended bynet.dpml.transit.SecuredTransitContext

public final class SecuredTransitContext
extends Object

The initial context of the transit system.

Version:
1.0.1
Author:
Digital Product Meta Library

Field Summary
static String DOMAIN
          The namespace string for transit related properties.
 
Method Summary
static SecuredTransitContext create(TransitModel model)
          Creation of the transit context.
 CacheHandler getCacheHandler()
          Return the cache handler.
 Layout getCacheLayout()
          Return the cache layout.
static SecuredTransitContext getInstance()
          Return the singleton context.
 Layout getLayout(String id)
          Return a layout object matching the supplied identifier.
 LinkManager getLinkManager()
          Return the link manager.
protected  void initialize()
          Initialization of any sub-systems following the establishment of the initial transit system.
protected  void setupProxy()
          General setup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DOMAIN

public static final String DOMAIN
The namespace string for transit related properties.

See Also:
Constant Field Values
Method Detail

create

public static SecuredTransitContext create(TransitModel model)
                                    throws TransitException,
                                           NullArgumentException
Creation of the transit context. If the transit context has already been established the method returns the singeton context otherwise a new context is created relative to the authoritve url and returned.

Parameters:
model - the active transit model
Returns:
the secured transit context
Throws:
TransitException - if an error occurs during context creation
NullArgumentException - if the supplied configration model is null and an instance of this class has not been created already.

getInstance

public static SecuredTransitContext getInstance()
Return the singleton context.

Returns:
the secure context

getLayout

public Layout getLayout(String id)
                 throws UnknownKeyException,
                        IOException
Return a layout object matching the supplied identifier.

Parameters:
id - the layout identifier
Returns:
the layout object
Throws:
UnknownKeyException - if the supplied layout id is unknown
IOException - if an IO error occurs

getCacheLayout

public Layout getCacheLayout()
Return the cache layout.

Returns:
the layout

getCacheHandler

public CacheHandler getCacheHandler()
Return the cache handler.

Returns:
the cache handler

getLinkManager

public LinkManager getLinkManager()
Return the link manager.

Returns:
the cache handler

setupProxy

protected void setupProxy()
                   throws RemoteException
General setup.

Throws:
RemoteException - if a remote error occurs

initialize

protected void initialize()
                   throws IOException
Initialization of any sub-systems following the establishment of the initial transit system. As a general principal any subsystems that cannot be established for technical reasons (security or permission restrictions, etc.) should log an appropriate message and fallback to the initial setup thereby ensuring that an operable transit system is available.

Throws:
IOException - if an io error occurs