org.eaglei.model.gwt.rpc
Class ClientModelManager

java.lang.Object
  extended by org.eaglei.model.gwt.rpc.ClientModelManager

public class ClientModelManager
extends java.lang.Object

Maintains a client-side cache of EIClasses. Proxies all model RPC methods. It is critical that all model RPC calls go through this class. All methods in this class MUST call getCached(EIClass) on all EIClass objects it receives from the server to ensure that there is only one instance of an EIClass per URI in the client.

Author:
Ted

Nested Class Summary
static interface ClientModelManager.ClassAnnotationsCallback
           
static interface ClientModelManager.ClassCallback
           
static interface ClientModelManager.ClassDefinitionCallback
           
static interface ClientModelManager.EquivalentClassCallback
           
static interface ClientModelManager.LabelsCallback
           
static interface ClientModelManager.NonResourceBaseClassesCallback
           
static interface ClientModelManager.PropertyCallback
           
static interface ClientModelManager.PropertyDefinitionCallback
           
static interface ClientModelManager.SubClassCallback
           
static interface ClientModelManager.SuperClassesCallback
           
static interface ClientModelManager.TopLevelClassesCallback
           
static interface ClientModelManager.VersionCallback
           
 
Field Summary
static ClientModelManager INSTANCE
           
 
Method Summary
 void getClass(org.eaglei.model.EIURI id, ClientModelManager.ClassCallback callback)
           
 void getClassAnnotations(java.util.List<org.eaglei.model.EIClass> classList, ClientModelManager.ClassAnnotationsCallback callback)
          Ensures that class annotations are set for all the classes in the given list.
 void getClassDefinitions(java.util.List<org.eaglei.model.EIClass> classList, ClientModelManager.ClassDefinitionCallback callback)
          Ensures that class definitions are set for all the classes in the given list.
 void getEquivalentClasses(org.eaglei.model.EIClass resource, ClientModelManager.EquivalentClassCallback callback)
          Call this to ensure that the equivalent class list of a given EIClass has been populated.
 void getLabels(org.eaglei.model.EIURI uri, ClientModelManager.LabelsCallback callback)
           
 void getNonResourceClasses(ClientModelManager.NonResourceBaseClassesCallback callback)
           
 void getProperties(org.eaglei.model.EIClass resource, ClientModelManager.PropertyCallback callback)
          Call this to ensure that the properties list of a given EIClass has been populated.
 void getPropertyDefinitions(java.util.List<org.eaglei.model.EIProperty> propertyList, ClientModelManager.PropertyDefinitionCallback callback)
          Ensures that property definitions are set for all the properties in the given list.
 void getSubClasses(org.eaglei.model.EIClass resource, ClientModelManager.SubClassCallback callback)
          Call this to ensure that the subclass list of a given EIClass has been populated.
 void getSuperClasses(org.eaglei.model.EIClass resource, ClientModelManager.SuperClassesCallback callback)
          Ensures that all superclasses of a given EIClass are available.
 void getSuperClasses(org.eaglei.model.EIURI resourceURI, ClientModelManager.SuperClassesCallback callback)
          Ensures that all superclasses of a given EIURI are available.
 void getTopLevelClasses(ClientModelManager.TopLevelClassesCallback callback)
           
 void getVersion(ClientModelManager.VersionCallback callback)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INSTANCE

public static final ClientModelManager INSTANCE
Method Detail

getVersion

public void getVersion(ClientModelManager.VersionCallback callback)

getTopLevelClasses

public void getTopLevelClasses(ClientModelManager.TopLevelClassesCallback callback)

getNonResourceClasses

public void getNonResourceClasses(ClientModelManager.NonResourceBaseClassesCallback callback)

getClass

public void getClass(org.eaglei.model.EIURI id,
                     ClientModelManager.ClassCallback callback)

getSubClasses

public void getSubClasses(org.eaglei.model.EIClass resource,
                          ClientModelManager.SubClassCallback callback)
Call this to ensure that the subclass list of a given EIClass has been populated. Note that if EIClass.hasSubClass() is false, the value of EIClass.getSubClasses() is undefined (probably null).

Parameters:
resource -
callback -

getSuperClasses

public void getSuperClasses(org.eaglei.model.EIURI resourceURI,
                            ClientModelManager.SuperClassesCallback callback)
Ensures that all superclasses of a given EIURI are available. In the callback, returns an EIClass for the uri in which getSuperClass() will be non-null if hasSuperClass() is true. Likewise, all ancestor EIClasses will have non-null superclasses if they have a superclass.

Parameters:
resourceURI -
callback -

getSuperClasses

public void getSuperClasses(org.eaglei.model.EIClass resource,
                            ClientModelManager.SuperClassesCallback callback)
Ensures that all superclasses of a given EIClass are available. In the callback, getSuperClass() will be non-null if hasSuperClass() is true. Likewise, all ancestor EIClasses will have non-null superclasses if they have a superclass. Note that if EIClass.hasSuperClass() is false, the value of EIClass.getSuperClass() is undefined (probably null).

Parameters:
resource -
callback -

getProperties

public void getProperties(org.eaglei.model.EIClass resource,
                          ClientModelManager.PropertyCallback callback)
Call this to ensure that the properties list of a given EIClass has been populated. Note that if EIClass.hasProperty() is false, the value of EIClass.getProperties() is undefined (probably null).

Parameters:
resource -
callback -

getEquivalentClasses

public void getEquivalentClasses(org.eaglei.model.EIClass resource,
                                 ClientModelManager.EquivalentClassCallback callback)
Call this to ensure that the equivalent class list of a given EIClass has been populated. Note that if EIClass.hasEquivalentClass() is false, the value of EIClass.getEquivalentClasses() is undefined (probably null).

Parameters:
resource -
callback -

getClassDefinitions

public void getClassDefinitions(java.util.List<org.eaglei.model.EIClass> classList,
                                ClientModelManager.ClassDefinitionCallback callback)
Ensures that class definitions are set for all the classes in the given list.

Parameters:
classList -

getPropertyDefinitions

public void getPropertyDefinitions(java.util.List<org.eaglei.model.EIProperty> propertyList,
                                   ClientModelManager.PropertyDefinitionCallback callback)
Ensures that property definitions are set for all the properties in the given list.

Parameters:
propertyList -

getClassAnnotations

public void getClassAnnotations(java.util.List<org.eaglei.model.EIClass> classList,
                                ClientModelManager.ClassAnnotationsCallback callback)
Ensures that class annotations are set for all the classes in the given list.

Parameters:
classList -

getLabels

public void getLabels(org.eaglei.model.EIURI uri,
                      ClientModelManager.LabelsCallback callback)


Copyright © 2009-2010 Eagle-I. All Rights Reserved.