org.netbeans.modules.xml.xam/1 1.18.0 1

org.netbeans.modules.xml.xam
Class AbstractModelFactory<M extends Model>

java.lang.Object
  extended by org.netbeans.modules.xml.xam.AbstractModelFactory<M>

public abstract class AbstractModelFactory<M extends Model>
extends Object


Field Summary
static int DELAY_DIRTY
           
static int DELAY_SYNCER
           
static String MODEL_LOADED_PROPERTY
           
 
Constructor Summary
AbstractModelFactory()
           
 
Method Summary
 void addPropertyChangeListener(PropertyChangeListener l)
          Adds property change listener on the factory to be notified on when new models are loaded by the factory.
 M createFreshModel(ModelSource modelSource)
          Create new model from given model source; returns null if there are errors during creation.
protected abstract  M createModel(ModelSource source)
           
static ModelAccessProvider getAccessProvider()
           
protected  Object getKey(ModelSource source)
          This method extracts the key from the model source.
protected  M getModel(ModelSource source)
           
 List<M> getModels()
          Returns list of models currently cached by the factory.
 void removePropertyChangeListener(PropertyChangeListener l)
          Removes property change listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DELAY_SYNCER

public static final int DELAY_SYNCER
See Also:
Constant Field Values

DELAY_DIRTY

public static final int DELAY_DIRTY
See Also:
Constant Field Values

MODEL_LOADED_PROPERTY

public static final String MODEL_LOADED_PROPERTY
See Also:
Constant Field Values
Constructor Detail

AbstractModelFactory

public AbstractModelFactory()
Method Detail

createModel

protected abstract M createModel(ModelSource source)

createFreshModel

public M createFreshModel(ModelSource modelSource)
Create new model from given model source; returns null if there are errors during creation. Note that, the returned model might not be valid, i.e., source is well-formed. Also, that the returned model is not cached and does not have background auto-sync support.


getKey

protected Object getKey(ModelSource source)
This method extracts the key from the model source. A subclass can change the ModelSource lookup requirements and thus this method may be overridden to allow a different key to be used.


getAccessProvider

public static ModelAccessProvider getAccessProvider()

getModel

protected M getModel(ModelSource source)

getModels

public List<M> getModels()
Returns list of models currently cached by the factory.


addPropertyChangeListener

public void addPropertyChangeListener(PropertyChangeListener l)
Adds property change listener on the factory to be notified on when new models are loaded by the factory.


removePropertyChangeListener

public void removePropertyChangeListener(PropertyChangeListener l)
Removes property change listener.


org.netbeans.modules.xml.xam/1 1.18.0 1

Built on May 25 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.