This package provides the implementation of directive containers as well as functionality to create instances. A directive container acts as a container of org.jplate.directive.DirectiveContainerIfc's (both a parent and many children), a org.jplate.directive.DirectiveIfc (for translation), a org.jplate.directive.DirectiveCacheIfc (repository for named directives), and a org.jplate.util.environment.EnvironmentIfc (to contain attributes and/or key/object pairs).

As mentioned, when translating the directive container uses a org.jplate.directive.DirectiveIfc for translation. The directive container will present itself to the directive for which it can gather data to aid in translation for the container. By structuring the code in this fashion, the directive container is able to do what it does best: containment. Allowing the container to use a directive for translation is an example of the Strategy Pattern.

Usage

To create an instance of org.jplate.tmplate.directive.DirectiveContainerIfc, please do the following (assume klass has been instantiated):

    //
    // Assume klass instantiated before this point...
    //
    final DirectiveContainerFactoryMgrIfc factoryMgr =
        DirectiveContainerFactoryMgrIfc.getSingleton ();

    final DirectiveContainerFactoryIfc factory =
        factoryMgr.getFactory ( klass );

    final DirectiveContainerIfc directiveContainer =
        factory.createDirectiveContainer ();
@see org.jplate.tmplate.directive.DirectiveCacheIfc @see org.jplate.tmplate.directive.DirectiveContainerIfc @see org.jplate.tmplate.directive.DirectiveIfc @see org.jplate.util.environment.EnvironmentIfc