Package io.vertigo.ui.core
Class ViewContextMap
- All Implemented Interfaces:
Serializable,Cloneable,Map<String,Serializable>
Liste des couples (clé, object) enregistrés.
- Author:
- npiedeloup
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddKeyForClient(String object, boolean modifiable) voidaddKeyForClient(String object, String fieldName, String rowIndex, boolean modifiable) voidaddListValueTransformer(String objectKey, String objectFieldName, String listKey, String listKeyFieldName, String listDisplayFieldName) voidaddProtectedValueTransformer(String objectKey, String objectFieldName) voidaddTypeForKey(String key, Type paramType) voidcheckErrors(String contextKey, UiMessageStack uiMessageStack) Vérifie les erreurs de l'objet.booleancontainsKey(Object key) findKey(io.vertigo.datamodel.structure.model.DtObject dtObject) getBoolean(String key) getId()getInteger(String key) <O extends io.vertigo.datamodel.structure.model.DtObject>
UiList<O><O extends io.vertigo.datamodel.structure.model.DtObject>
BasicUiListModifiable<O><O extends io.vertigo.datamodel.structure.model.DtObject>
UiObject<O>getUiObject(String key) booleanisDirty()voidGénère un nouvel Id et passe le context en modifiable.voidpasse le context en non-modifiable.voidMark this context as Dirty : shouldn't be stored and keep old id.obtainFkList(String objectKey, String objectFieldName) <O extends io.vertigo.datamodel.structure.model.DtObject>
voidAjoute un objet de type form au context.put(String key, Serializable value) <O extends io.vertigo.datamodel.structure.model.DtObject>
OreadDto(String contextKey, DtObjectValidator<O> validator, UiMessageStack uiMessageStack) <O extends io.vertigo.datamodel.structure.model.DtObject>
OreadDto(String contextKey, UiMessageStack uiMessageStack) voidsetJsonEngine(JsonEngine jsonEngine) Fixe le mode d'update : filtré ou non (par les champs éditables de l'ihm).Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, putAll, putIfAbsent, remove, replace, replace, replaceAll, size, valuesMethods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Field Details
-
CTX
Clée de l'id de context dans le context.- See Also:
-
INPUT_CTX
- See Also:
-
CTX_CREATION_INSTANT
Clée de la creation de context dans le context.- See Also:
-
CTX_REUSE_INSTANT
- See Also:
-
INPUT_CTX_REUSE_INSTANT
- See Also:
-
-
Constructor Details
-
ViewContextMap
public ViewContextMap()
-
-
Method Details
-
get
- Specified by:
getin interfaceMap<String,Serializable> - Overrides:
getin classHashMap<String,Serializable>
-
getUiObject
public <O extends io.vertigo.datamodel.structure.model.DtObject> UiObject<O> getUiObject(String key) - Parameters:
key- Clé de context- Returns:
- UiObject du context
-
getUiList
- Parameters:
key- Clé de context- Returns:
- UiList du context
-
getUiListModifiable
public <O extends io.vertigo.datamodel.structure.model.DtObject> BasicUiListModifiable<O> getUiListModifiable(String key) - Parameters:
key- Clé de context- Returns:
- UiListModifiable du context
-
getString
- Parameters:
key- Clé de context- Returns:
- String du context
-
getLong
- Parameters:
key- Clé de context- Returns:
- Long du context
-
getInteger
- Parameters:
key- Clé de context- Returns:
- Integer du context
-
getBoolean
- Parameters:
key- Clé de context- Returns:
- Boolean du context
-
containsKey
- Specified by:
containsKeyin interfaceMap<String,Serializable> - Overrides:
containsKeyin classHashMap<String,Serializable>
-
findKey
- Parameters:
uiObject- UiObject recherché- Returns:
- Clé de context de l'élément (null si non trouvé)
-
findKey
- Parameters:
dtObject- DtObject recherché- Returns:
- Clé de context de l'élément (null si non trouvé)
-
put
- Specified by:
putin interfaceMap<String,Serializable> - Overrides:
putin classHashMap<String,Serializable>
-
remove
- Specified by:
removein interfaceMap<String,Serializable> - Overrides:
removein classHashMap<String,Serializable>
-
getId
- Returns:
- Clé de ce context
-
viewContextUpdateSecurity
Fixe le mode d'update : filtré ou non (par les champs éditables de l'ihm). -
makeModifiable
public void makeModifiable()Génère un nouvel Id et passe le context en modifiable. -
makeUnmodifiable
public void makeUnmodifiable()passe le context en non-modifiable. -
markDirty
public void markDirty()Mark this context as Dirty : shouldn't be stored and keep old id. -
isDirty
public boolean isDirty()- Returns:
- if context dirty : shouldn't be stored and keep old id
-
getVContext
-
publish
public <O extends io.vertigo.datamodel.structure.model.DtObject> void publish(String contextKey, O dto) Ajoute un objet de type form au context.- Parameters:
dto- Objet à publier
-
checkErrors
Vérifie les erreurs de l'objet. Celles-ci sont ajoutées à l'uiMessageStack si nécessaire. -
readDto
public <O extends io.vertigo.datamodel.structure.model.DtObject> O readDto(String contextKey, UiMessageStack uiMessageStack) - Returns:
- objet métier validé. Lance une exception si erreur.
-
readDto
public <O extends io.vertigo.datamodel.structure.model.DtObject> O readDto(String contextKey, DtObjectValidator<O> validator, UiMessageStack uiMessageStack) - Returns:
- objet métier validé. Lance une exception si erreur.
-
addKeyForClient
-
addKeyForClient
-
addProtectedValueTransformer
-
obtainFkList
-
addListValueTransformer
-
addTypeForKey
-
setJsonEngine
-