org.apache.avalon.composition.model
Interface ContextModel

All Superinterfaces:
Dependent
All Known Implementing Classes:
DefaultContextModel

public interface ContextModel
extends Dependent

Specification of a context model from which a a fully qualifed context can be established.

Version:
$Revision: 1.7 $ $Date: 2004/03/13 23:26:56 $
Author:
Avalon Development Team

Field Summary
static String DEFAULT_STRATEGY_CLASSNAME
          The default context strategy interface class.
 
Method Summary
 Class getCastingClass()
          Return the class that the context is castable to.
 Object getContext()
          Return the context object for the component.
 DeliveryDescriptor getDeliveryDescriptor()
          Return the delivery descriptor.
 EntryModel getEntryModel(String key)
          Return an entry model matching the supplied key.
 EntryModel[] getEntryModels()
          Return the set of entry models associated with this context model.
 Class getStrategyClass()
          Return the class representing the contextualization stage interface.
 boolean isEnabled()
          Return the enabled state of the context model.
 void setEntry(String key, Object value)
          Set the entry to a suplied value.
 void setEntryModel(String key, EntryModel model)
          Set the entry model relative to a supplied key.
 
Methods inherited from interface org.apache.avalon.composition.model.Dependent
clearProvider, getProvider, setProvider
 

Field Detail

DEFAULT_STRATEGY_CLASSNAME

public static final String DEFAULT_STRATEGY_CLASSNAME
The default context strategy interface class.

See Also:
Constant Field Values
Method Detail

isEnabled

public boolean isEnabled()
Return the enabled state of the context model.

Returns:
TRUE if enabled else FALSE

getDeliveryDescriptor

public DeliveryDescriptor getDeliveryDescriptor()
Return the delivery descriptor.

Returns:
the descriptor

getCastingClass

public Class getCastingClass()
Return the class that the context is castable to.

Returns:
the base context casting class

getStrategyClass

public Class getStrategyClass()
Return the class representing the contextualization stage interface.

Returns:
the contextualization interface class

getContext

public Object getContext()
Return the context object for the component.

Returns:
the context object

getEntryModels

public EntryModel[] getEntryModels()
Return the set of entry models associated with this context model.

Returns:
the entry models

getEntryModel

public EntryModel getEntryModel(String key)
Return an entry model matching the supplied key.

Returns:
the entry model or null if tyhe key is unknown

setEntryModel

public void setEntryModel(String key,
                          EntryModel model)
Set the entry model relative to a supplied key.

Parameters:
key - the entry key
model - the entry model

setEntry

public void setEntry(String key,
                     Object value)
Set the entry to a suplied value.

Parameters:
key - the entry key
value - the entry value


Copyright © The Apache Software Foundation. All Rights Reserved.