net.dpml.metro
Interface ContextModel

All Superinterfaces:
Remote

public interface ContextModel
extends Remote

The ContextModel interface defines the remotely accessible component context.

Version:
1.0.1
Author:
Digital Product Meta Library

Method Summary
 EntryDescriptor getEntryDescriptor(String key)
          Return a of context entry descriptor.
 EntryDescriptor[] getEntryDescriptors()
          Return the set of context entries descriptors.
 Directive getEntryDirective(String key)
          Return the current directive assigned to a context entry.
 void setEntryDirective(String key, Directive directive)
          Set a context entry directive value.
 void setEntryDirectives(PartReference[] directives)
          Apply an array of tagged directive as an atomic operation.
 void validate()
          Validate the model.
 

Method Detail

getEntryDescriptors

public EntryDescriptor[] getEntryDescriptors()
                                      throws RemoteException
Return the set of context entries descriptors.

Returns:
context entry descriptor array
Throws:
RemoteException - if a remote exception occurs

getEntryDescriptor

public EntryDescriptor getEntryDescriptor(String key)
                                   throws UnknownKeyException,
                                          RemoteException
Return a of context entry descriptor.

Parameters:
key - the entry key
Returns:
the entry descriptor
Throws:
UnknownKeyException - if the key is unknown
RemoteException - if a remote exception occurs

getEntryDirective

public Directive getEntryDirective(String key)
                            throws UnknownKeyException,
                                   RemoteException
Return the current directive assigned to a context entry.

Parameters:
key - the context entry key
Returns:
the directive
Throws:
UnknownKeyException - if the key is unknown
RemoteException - if a remote exception occurs

validate

public void validate()
              throws ValidationException,
                     RemoteException
Validate the model.

Throws:
ValidationException - if one or more issues exist within the model
RemoteException - if a remote exception occurs

setEntryDirective

public void setEntryDirective(String key,
                              Directive directive)
                       throws UnknownKeyException,
                              RemoteException
Set a context entry directive value.

Parameters:
key - the context entry key
directive - the context entry directive
Throws:
UnknownKeyException - if the key is unknown
RemoteException - if a remote I/O error occurs

setEntryDirectives

public void setEntryDirectives(PartReference[] directives)
                        throws UnknownKeyException,
                               RemoteException
Apply an array of tagged directive as an atomic operation. Application of directives to the context model is atomic such that changes are applied under an 'all-or-nothing' policy.

Parameters:
directives - an array of part references
Throws:
UnknownKeyException - if a key within the array does not match a key within the context model.
RemoteException - if a remote I/O error occurs