com.tensegrity.composite
Class CompositeAttributeConstraintRegistry

java.lang.Object
  extended bycom.tensegrity.composite.CompositeAttributeConstraintRegistry

public final class CompositeAttributeConstraintRegistry
extends java.lang.Object

The CompositeAttributeConstraintRegistry class represent the global registry for composite attribute constraints. The registered constraints are used to restrict the values of attributes for a specific composite.

Registered Constraints are matched to composite attributes through the key they are registered with by the following rule. The key must be the concatenation of the name of the composite, the name of the category and the name of the attribute seperated by '.'. For example there is a composite with the name 'TitleLabel' which has a category 'Geometry' and an attribute 'X' in the 'Geometry' category. In order to register a Constraint for that attribute one has to register it with the key 'TitleLabel.Geometry.X'.

Version:
$Id: CompositeAttributeConstraintRegistry.java,v 1.2 2004/01/12 13:31:39 AndreasEbbert Exp $
Author:
MKegel

Method Summary
static void clear()
          Removes all registered constraint from the registry
static Constraint get(java.lang.String attributename)
          Returns a Constraint which is identitied through the key given by attributename.
static void register(java.lang.String attributename, Constraint constraint)
          Registers the Constraint given by constraint at the registry.
static void unregister(java.lang.String attributename)
          Removes the Constraint that is identified through the key given by attributename from the registry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

register

public static final void register(java.lang.String attributename,
                                  Constraint constraint)
Registers the Constraint given by constraint at the registry. This Constraint is later on referred to through the key given by attributename.

Parameters:
attributename - the key of the Constraint to register. A Constraint that has been registered under the same key will be overridden. This value must not be null.
constraint - the Constraint to register. This value must not be null.

unregister

public static final void unregister(java.lang.String attributename)
Removes the Constraint that is identified through the key given by attributename from the registry.

Parameters:
attributename - the key of the Constraint to remove

get

public static final Constraint get(java.lang.String attributename)
Returns a Constraint which is identitied through the key given by attributename. If no constraint is registered for the key null is returned.

Parameters:
attributename - the key of the Constraint to return
Returns:
Constraint the Constraint for the given key or null

clear

public static final void clear()
Removes all registered constraint from the registry



Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.