org.jbpm.wire.descriptor
Class AbstractDescriptor

java.lang.Object
  extended by org.jbpm.util.DefaultObservable
      extended by org.jbpm.wire.descriptor.AbstractDescriptor
All Implemented Interfaces:
java.io.Serializable, Observable, Descriptor
Direct Known Subclasses:
BusinessCalendarDescriptor, ByteDescriptor, CharacterDescriptor, ClassDescriptor, ClassLoaderDescriptor, CollectionDescriptor, CommandServiceDescriptor, ContextDescriptor, DeployerManagerDescriptor, DoubleDescriptor, EnterpriseTransactionDescriptor, EnvironmentDescriptor, EnvironmentFactoryDescriptor, EnvironmentInterceptorDescriptor, FalseDescriptor, FloatDescriptor, HibernateConfigurationDescriptor, HibernateSessionDescriptor, HibernateSessionFactoryDescriptor, IntegerDescriptor, LongDescriptor, NullDescriptor, ObjectDescriptor, ProvidedObjectDescriptor, PvmDbSessionDescriptor, PvmServiceDescriptor, ReferenceDescriptor, RetryInterceptorDescriptor, SeamHibernateSessionDescriptor, ShortDescriptor, StandardTransactionDescriptor, StringDescriptor, TrueDescriptor, TypeRefDescriptor, UrlDescriptor, VariableTypeResolverDescriptor

public abstract class AbstractDescriptor
extends DefaultObservable
implements java.io.Serializable, Descriptor

base class for Descriptors.

Author:
Tom Baeyens
See Also:
Serialized Form

Field Summary
protected  long dbid
           
protected  int dbversion
           
protected  char init
           
static char INIT_EAGER
          eager creation and delayed initialization
static char INIT_IMMEDIATE
          eager creation and immediate initialization
static char INIT_LAZY
          lazy creation and delayed initialization
static char INIT_REQUIRED
          lazy creation and immediate initialization
protected  java.lang.String name
           
protected  int version
           
 
Fields inherited from class org.jbpm.util.DefaultObservable
listeners
 
Fields inherited from interface org.jbpm.wire.Descriptor
EVENT_CONSTRUCTED, EVENT_CONSTRUCTING, EVENT_INITIALIZING, EVENT_REMOVE, EVENT_SET
 
Constructor Summary
AbstractDescriptor()
           
AbstractDescriptor(java.lang.String name)
           
 
Method Summary
 java.lang.Long getDbid()
          the db primary key.
 java.lang.String getName()
          the name of this descriptor
 java.lang.Class<?> getType(WireDefinition wireDefinition)
          the type of the produced object or null if that is not available
 void initialize(java.lang.Object object, WireContext wireContext)
          called by the WireContext to initialize the specified object.
 boolean isDelayable()
          Checks if the initialization should be done during the construction phase or if it can be done later.
 boolean isEagerInit()
          if eager initialization is set, it means that an object must be created immediately during construction of the WireContext.
 void setInit(char init)
          see section 'Initialization' of WireContext
 void setName(java.lang.String name)
           
 
Methods inherited from class org.jbpm.util.DefaultObservable
addListener, addListener, addListener, fire, fire, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jbpm.wire.Descriptor
construct
 
Methods inherited from interface org.jbpm.util.Observable
addListener, addListener, addListener, fire, fire, removeListener
 

Field Detail

dbid

protected long dbid

dbversion

protected int dbversion

version

protected int version

name

protected java.lang.String name

INIT_LAZY

public static final char INIT_LAZY
lazy creation and delayed initialization

See Also:
Constant Field Values

INIT_EAGER

public static final char INIT_EAGER
eager creation and delayed initialization

See Also:
Constant Field Values

INIT_REQUIRED

public static final char INIT_REQUIRED
lazy creation and immediate initialization

See Also:
Constant Field Values

INIT_IMMEDIATE

public static final char INIT_IMMEDIATE
eager creation and immediate initialization

See Also:
Constant Field Values

init

protected char init
Constructor Detail

AbstractDescriptor

public AbstractDescriptor()

AbstractDescriptor

public AbstractDescriptor(java.lang.String name)
Method Detail

getType

public java.lang.Class<?> getType(WireDefinition wireDefinition)
Description copied from interface: Descriptor
the type of the produced object or null if that is not available

Specified by:
getType in interface Descriptor

isEagerInit

public boolean isEagerInit()
Description copied from interface: Descriptor
if eager initialization is set, it means that an object must be created immediately during construction of the WireContext.

Specified by:
isEagerInit in interface Descriptor

isDelayable

public boolean isDelayable()
Description copied from interface: Descriptor
Checks if the initialization should be done during the construction phase or if it can be done later.

Specified by:
isDelayable in interface Descriptor
Returns:
false if the initialization should be done during the creation phase, true if it can be done later.

initialize

public void initialize(java.lang.Object object,
                       WireContext wireContext)
Description copied from interface: Descriptor
called by the WireContext to initialize the specified object. For more information about initialization, see WireContext section lifecycle.

Specified by:
initialize in interface Descriptor
Parameters:
object - object to initialize.
wireContext - the context in which the object will be initialized.

getDbid

public java.lang.Long getDbid()
the db primary key.


getName

public java.lang.String getName()
Description copied from interface: Descriptor
the name of this descriptor

Specified by:
getName in interface Descriptor

setName

public void setName(java.lang.String name)

setInit

public void setInit(char init)
see section 'Initialization' of WireContext