org.kuali.rice.krms.api.repository.context
Class ContextDefinition

java.lang.Object
  extended by org.kuali.rice.core.api.mo.AbstractDataTransferObject
      extended by org.kuali.rice.krms.api.repository.context.ContextDefinition
All Implemented Interfaces:
Serializable, Inactivatable, Identifiable, Versioned, ModelObjectBasic, ModelObjectComplete, ContextDefinitionContract

public final class ContextDefinition
extends AbstractDataTransferObject
implements ContextDefinitionContract

An immutable representation of a context definition. A context definition defines information about a context which can be loaded into the rules engine for evaluation. A context definition includes a list of agendas which are valid within the context. Typically, during rule engine execution, one or more of these agendas is selected for execution based on a given set of selection criteria.

Author:
Kuali Rice Team (rice.collab@kuali.org)
See Also:
ContextDefinitionContract, Serialized Form

Nested Class Summary
static class ContextDefinition.Builder
          A builder which can be used to construct ContextDefinition instances.
static class ContextDefinition.Constants
          Defines some internal constants used on this class.
static class ContextDefinition.Elements
          A private class which exposes constants which define the XML element names to use when this object is marshalled to XML.
 
Method Summary
 List<AgendaDefinition> getAgendas()
          Returns the list of agendas AgendaDefinitionContract contained in the context definition.
 Map<String,String> getAttributes()
          Returns a map of name/value pairs representing the attributes associated with this context.
 String getDescription()
          Returns the description of the context definition.
 String getId()
          The unique identifier for an object.
 String getName()
          Returns the name of the context definition.
 String getNamespace()
          Returns the namespace of the context definition.
 String getTypeId()
          Returns the type id for the context definition.
 Long getVersionNumber()
          Returns the version number for this object.
 boolean isActive()
          The active indicator for an object.
 
Methods inherited from class org.kuali.rice.core.api.mo.AbstractDataTransferObject
afterUnmarshal, beforeUnmarshal, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getId

public String getId()
Description copied from interface: Identifiable
The unique identifier for an object. This can be null.

Specified by:
getId in interface Identifiable
Returns:
the id

getNamespace

public String getNamespace()
Description copied from interface: ContextDefinitionContract
Returns the namespace of the context definition. The combination of namespace and name represent a unique business key for the context definition. The namespace should never be null or blank.

Specified by:
getNamespace in interface ContextDefinitionContract
Returns:
the namespace of the context definition, should never be null or blank

getName

public String getName()
Description copied from interface: ContextDefinitionContract
Returns the name of the context definition. The combination of name and namespaceCode represent a unique business key for the context definition. The name should never be null or blank.

Specified by:
getName in interface ContextDefinitionContract
Returns:
the name of the context definition, should never be null or blank

getTypeId

public String getTypeId()
Description copied from interface: ContextDefinitionContract
Returns the type id for the context definition. If the type id is null, that means this context definition is of the default type.

Specified by:
getTypeId in interface ContextDefinitionContract
Returns:
the type id for the context definition, or null if this context definition is of the default type

getDescription

public String getDescription()
Description copied from interface: ContextDefinitionContract
Returns the description of the context definition.

Specified by:
getDescription in interface ContextDefinitionContract
Returns:
the description of the context definition. May be null.

isActive

public boolean isActive()
Description copied from interface: Inactivatable
The active indicator for an object.

Specified by:
isActive in interface Inactivatable
Returns:
true if active false if not.

getAgendas

public List<AgendaDefinition> getAgendas()
Description copied from interface: ContextDefinitionContract
Returns the list of agendas AgendaDefinitionContract contained in the context definition. This method should never return null. An empty list is returned if no agendas are associated with this context.

Specified by:
getAgendas in interface ContextDefinitionContract
Returns:
the list of agendas contained in this context definition

getAttributes

public Map<String,String> getAttributes()
Description copied from interface: ContextDefinitionContract
Returns a map of name/value pairs representing the attributes associated with this context.

This method should never return null. An empty map is returned if no attributes are associated with the context.

Specified by:
getAttributes in interface ContextDefinitionContract
Returns:
a list of Map of name/value String pairs.

getVersionNumber

public Long getVersionNumber()
Description copied from interface: Versioned
Returns the version number for this object. In general, this value should only be null if the object has not yet been stored to a persistent data store. This version number is generally used for the purposes of optimistic locking.

Specified by:
getVersionNumber in interface Versioned
Returns:
the version number, or null if one has not been assigned yet


Copyright © 2005-2012 The Kuali Foundation. All Rights Reserved.