Class ViewContextMap

    • Constructor Detail

      • ViewContextMap

        public ViewContextMap()
    • Method Detail

      • 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

        public <O extends io.vertigo.datamodel.structure.model.DtObject> UiList<O> getUiList​(String key)
        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

        public String getString​(String key)
        Parameters:
        key - Clé de context
        Returns:
        String du context
      • getLong

        public Long getLong​(String key)
        Parameters:
        key - Clé de context
        Returns:
        Long du context
      • getInteger

        public Integer getInteger​(String key)
        Parameters:
        key - Clé de context
        Returns:
        Integer du context
      • getBoolean

        public Boolean getBoolean​(String key)
        Parameters:
        key - Clé de context
        Returns:
        Boolean du context
      • findKey

        public String findKey​(UiObject<?> uiObject)
        Parameters:
        uiObject - UiObject recherché
        Returns:
        Clé de context de l'élément (null si non trouvé)
      • findKey

        public String findKey​(io.vertigo.datamodel.structure.model.DtObject dtObject)
        Parameters:
        dtObject - DtObject recherché
        Returns:
        Clé de context de l'élément (null si non trouvé)
      • getId

        public String getId()
        Returns:
        Clé de ce context
      • viewContextUpdateSecurity

        public ViewContextUpdateSecurity 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
      • 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

        public void checkErrors​(String contextKey,
                                UiMessageStack uiMessageStack)
        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

        public void addKeyForClient​(String object,
                                    String fieldName,
                                    String rowIndex,
                                    boolean modifiable)
      • addKeyForClient

        public void addKeyForClient​(String object,
                                    boolean modifiable)
      • addProtectedValueTransformer

        public void addProtectedValueTransformer​(String objectKey,
                                                 String objectFieldName)
      • obtainFkList

        public String obtainFkList​(String objectKey,
                                   String objectFieldName)
      • addListValueTransformer

        public void addListValueTransformer​(String objectKey,
                                            String objectFieldName,
                                            String listKey,
                                            String listKeyFieldName,
                                            String listDisplayFieldName)
      • addTypeForKey

        public void addTypeForKey​(String key,
                                  Type paramType)
      • setJsonEngine

        public void setJsonEngine​(JsonEngine jsonEngine)