Insight Operations
Data storage
Legend import
Using Insight

Operation objects

Operation objects are derived from the Command pattern, which encapsulates a method call with all its parameters in a single object. It allows to offer a single RMI interface with one execute method, without sacrifying type-safety.

Operation overview

Concrete Operation classes will define their own parameters. By convention, Operation result is supposed to be returned by a getResult() method, whose type may vary.

Operation objects are used for performing all operations on content metamodel. Content itself is accessed through an Operation returning an URL referencing the requested content.

Operation classes are the main API part of the Insight subsystem. See Javadoc for more details on them.

Buisness Objects as Operation parameters

Buisness Objects are intended to be manipulated on the client side, so they are supposed to be passed as normal parameters.

A problem arises with Buisness Objects which are involved in a bi-directional association.

Buisness Objects with bi-directional association

Using a naive implementation of those classes could lead to following situations :
  • Serializing the whole model.
  • Serializing copies where some references have been arbitrarily set to null (hoping they won't be accessed).
  • Require complex cache management on client side.
All those situations may be avoided, by using a dedicated pattern.

The "Graph Buster" pattern

The buisness classes above should be translated in implementation classes as follows :

Parameter Objects implementing correct 1..* association

Representing a relation with 0..* cardinality is reassigned to a new XxxNode class. There is no risk then to get the whole serialized Model when requesting one single Xxx object.

The separation between abstract class (or interface) and concrete class guarantees that instances will be seen as immutable by Operation requesters. Only Operation objects are supposed to create implementation objects.

The Graph Buster Pattern allows making a clear difference between data on the server, and the local copy the client receives.

Javadoc for classes illustrating the Graph Buster pattern can be found on :

Copyright 2002 Laurent Caillette and l'Université René Descartes, Paris 5.
All rights reserved.