Class FormDesignerModelFactory


  • public final class FormDesignerModelFactory
    extends Object
    Utility methods for creating the various models used by the form designer.
    Since:
    7.0.0
    Author:
    XIMA MEDIA GmbH
    • Method Detail

      • createFormDesignerModel

        public static FormDesignerModel createFormDesignerModel​(javax.faces.context.FacesContext facesContext,
                                                                IEntityContext ec,
                                                                Mandant client,
                                                                ProjectPageBean projectHolder,
                                                                Locale locale,
                                                                Benutzer user,
                                                                WebFormPersistFile initialPersist)
                                                         throws AccessDeniedException,
                                                                javassist.NotFoundException,
                                                                Exception
        Creates a new form designer model from the data of the given faces request.
        Parameters:
        facesContext - Faces context of the currently active faces request.
        ec - Entity context to use for database transactions.
        client - Current client.
        projectHolder - Current project.
        locale - Requested locale.
        user - User who requested the designer.
        initialPersist - Initial persist to be loaded on startup.
        Returns:
        A new form designer model
        Throws:
        AccessDeniedException - When the user does not have access to the requested designer instance.
        javassist.NotFoundException - When the requested project, workflow version or form version could not be found.
        Exception - When the model could not be created for any other reason, such as database failures etc.
      • findAvailableFormVersionBackups

        public static List<FormBackupVersion> findAvailableFormVersionBackups​(IEntityContext ec,
                                                                              Locale locale,
                                                                              ProjectPageBean projectHolder)
                                                                       throws Exception
        Reads the available backup versions from the database and returns them.
        Parameters:
        ec - Entity context to use for database transactions.
        locale - Current locale.
        projectHolder - Current project.
        Returns:
        A list of all currently available backup version.
        Throws:
        Exception - When the list could not be created, such as when the database could not be accessed.