com.sun.xml.registry.client.browser.swing
Class RegistryMappedModel

java.lang.Object
  extended byjava.util.Observable
      extended bycom.sun.xml.registry.client.browser.swing.RegistryMappedModel
All Implemented Interfaces:
MappedModel, Model
Direct Known Subclasses:
EmailAddressModel, PostalAddressModel, TelephoneNumberModel

public abstract class RegistryMappedModel
extends java.util.Observable
implements MappedModel

Implements a few commonly used methods in a MappedModel. Uses the strategy design pattern.

Author:
Fabian Ritzmann

Field Summary
protected  java.lang.String key
           
 
Constructor Summary
RegistryMappedModel(java.lang.String k)
          Initializes the object with an initial mapping.
 
Method Summary
 void setKey(java.lang.String k)
          Sets a new mapping.
abstract  void validate()
          Derived classes need to implement the interface method.
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

key

protected java.lang.String key
Constructor Detail

RegistryMappedModel

public RegistryMappedModel(java.lang.String k)
Initializes the object with an initial mapping.

Parameters:
k - Key that selects the initial model mapping.
Method Detail

setKey

public void setKey(java.lang.String k)
Sets a new mapping. All observers registered with this model are notified if the mapping changed.

Specified by:
setKey in interface MappedModel
Parameters:
k - Key to the new mapping
See Also:
MappedModel.setKey(String)

validate

public abstract void validate()
                       throws javax.xml.registry.JAXRException
Derived classes need to implement the interface method.

Specified by:
validate in interface Model
Throws:
javax.xml.registry.JAXRException - Thrown if the model is invalid or validation encountered an internal error
See Also:
Model.validate()


Copyright © 2001-2004 OASIS. All Rights Reserved.