org.chromattic.api
Class ChromatticBuilder

java.lang.Object
  extended by org.chromattic.api.ChromatticBuilder

public abstract class ChromatticBuilder
extends Object

Version:
$Revision$
Author:
Julien Viet

Nested Class Summary
static class ChromatticBuilder.Option<T>
          A configuration option.
protected static class ChromatticBuilder.OptionInstance<T>
           
 
Field Summary
protected  Set<Class<?>> classes
          .
static ChromatticBuilder.Option<String> INSTRUMENTOR_CLASSNAME
          The instrumentor class name for Chromattic's objects.
static ChromatticBuilder.Option<String> OBJECT_FORMATTER_CLASSNAME
          The object name formatter class name.
protected  Map<String,ChromatticBuilder.OptionInstance<?>> options
          .
static ChromatticBuilder.Option<String> SESSION_LIFECYCLE_CLASSNAME
          The JCR session life cycle class name.
static ChromatticBuilder.Option<Boolean> STATE_CACHE_ENABLED
          The boolean indicating if caching is performed.
 
Constructor Summary
ChromatticBuilder()
           
 
Method Summary
 void add(Class<?> clazz)
           
protected abstract  Chromattic boot()
           
 Chromattic build()
           
protected abstract
<T> void
configure(ChromatticBuilder.OptionInstance<T> option)
           
static ChromatticBuilder create()
           
<T> void
setOption(ChromatticBuilder.Option<T> option, T value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTRUMENTOR_CLASSNAME

public static final ChromatticBuilder.Option<String> INSTRUMENTOR_CLASSNAME
The instrumentor class name for Chromattic's objects. The specified class must implement the org.chromattic.spi.instrument.Intrumentor class.


SESSION_LIFECYCLE_CLASSNAME

public static final ChromatticBuilder.Option<String> SESSION_LIFECYCLE_CLASSNAME
The JCR session life cycle class name. The specified class must implement the org.chromattic.spi.jcr.SessionLifeCycle class.


OBJECT_FORMATTER_CLASSNAME

public static final ChromatticBuilder.Option<String> OBJECT_FORMATTER_CLASSNAME
The object name formatter class name. The specified class must implement the org.chromattic.api.format.ObjectFormatter class.


STATE_CACHE_ENABLED

public static final ChromatticBuilder.Option<Boolean> STATE_CACHE_ENABLED
The boolean indicating if caching is performed. When cache is enabled each session maintains a cache that avoids to use the underlying JCR session. As a consequence any change made directly to the JCR session will not be visible in the object domain.


classes

protected final Set<Class<?>> classes
.


options

protected final Map<String,ChromatticBuilder.OptionInstance<?>> options
.

Constructor Detail

ChromatticBuilder

public ChromatticBuilder()
Method Detail

create

public static ChromatticBuilder create()

setOption

public <T> void setOption(ChromatticBuilder.Option<T> option,
                          T value)

add

public void add(Class<?> clazz)

build

public Chromattic build()
                 throws Exception
Throws:
Exception

boot

protected abstract Chromattic boot()
                            throws Exception
Throws:
Exception

configure

protected abstract <T> void configure(ChromatticBuilder.OptionInstance<T> option)


Copyright © 2009 eXo Platform SAS. All Rights Reserved.