|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jminor.framework.client.model.DefaultEntityApplicationModel
public abstract class DefaultEntityApplicationModel
A central application model class.
Constructor Summary | |
---|---|
DefaultEntityApplicationModel(EntityConnectionProvider connectionProvider)
Instantiates a new DefaultEntityApplicationModel |
Method Summary | |
---|---|
EntityModel |
addMainApplicationModel(EntityModel detailModel)
Adds the given detail model to this model |
void |
addMainApplicationModels(EntityModel... mainApplicationModels)
Adds the given detail models to this model. |
void |
clear()
Clears all data from this refreshable instance |
EntityConnectionProvider |
getConnectionProvider()
|
static TreeModel |
getDependencyTreeModel()
|
static TreeModel |
getDependencyTreeModel(String domainID)
|
EntityModel |
getMainApplicationModel(Class<? extends EntityModel> modelClass)
|
EntityModel |
getMainApplicationModel(String entityID)
|
List<? extends EntityModel> |
getMainApplicationModels()
|
User |
getUser()
|
protected void |
handleLogin()
Called after a login has been performed Override to add a login handler. |
protected void |
handleLogout()
Called after a logout has been performed. |
protected abstract void |
loadDomainModel()
This method should load the domain model, for example by instantiating the domain model class or simply loading it by name |
void |
login(User user)
Logs in the given user |
void |
logout()
Log out from this application model |
void |
refresh()
Performs a refresh |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultEntityApplicationModel(EntityConnectionProvider connectionProvider)
connectionProvider
- the EntityConnectionProvider instanceMethod Detail |
---|
public final void logout()
logout
in interface EntityApplicationModel
public final void login(User user)
login
in interface EntityApplicationModel
user
- the user to loginpublic final User getUser()
getUser
in interface EntityApplicationModel
public final EntityConnectionProvider getConnectionProvider()
getConnectionProvider
in interface EntityApplicationModel
public final void addMainApplicationModels(EntityModel... mainApplicationModels)
addMainApplicationModels
in interface EntityApplicationModel
mainApplicationModels
- the detail models to addpublic final EntityModel addMainApplicationModel(EntityModel detailModel)
addMainApplicationModel
in interface EntityApplicationModel
detailModel
- the detail model
public final List<? extends EntityModel> getMainApplicationModels()
getMainApplicationModels
in interface EntityApplicationModel
public final void refresh()
refresh
in interface Refreshable
public final void clear()
clear
in interface Refreshable
public final EntityModel getMainApplicationModel(Class<? extends EntityModel> modelClass)
getMainApplicationModel
in interface EntityApplicationModel
modelClass
- the model class
public final EntityModel getMainApplicationModel(String entityID)
getMainApplicationModel
in interface EntityApplicationModel
entityID
- the entity ID
public static TreeModel getDependencyTreeModel()
public static TreeModel getDependencyTreeModel(String domainID)
domainID
- the ID of the domain for which to return a dependency tree model
protected abstract void loadDomainModel()
protected void handleLogout()
protected void handleLogin()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |