Package de.xima.fc.api.entity
Class FormVersionAPI
API class for manipulation of
FormVersion entities.- Author:
- XIMA MEDIA GmbH
-
Field Summary
Fields inherited from class de.xima.fc.api.entity.AEntityAPI
entityClass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(UserContext uc, FormVersion formVersion, boolean isFirstFormVersion) Method for creating aFormVersionentity.getBy(UserContext uc, Projekt projekt, int formVersionNumber) Method for determining aFormVersionbased of aProjektand a version number.getByProjekt(UserContext uc, Projekt projekt) Method for loading ofFormVersions of aProjekt.com.alibaba.fastjson.JSONObjectgetFormAsJSON(UserContext uc, FormVersion fv) This method deliver the JSON for creating a XForm without any styles.getFormAsString(UserContext uc, FormVersion fv) getFormElemente(UserContext uc, FormVersion formVersion) Method to submit allFormElements of aFormVersion.intgetFormVersionCount(UserContext uc, Projekt projekt) Method for determining the number ofFormVersions of aProjekt.com.alibaba.fastjson.JSONObjectmergeFormElemente(UserContext uc, FormVersion fv) Deprecated.Methods inherited from class de.xima.fc.api.entity.AEntityAPI
create, create, delete, delete, deleteAllBy, deleteById, deleteById, getAll, getAllBy, getAttributes, getAttributes, getBy, getById, getById, getEntityRefs, getSingleAttributes, getSingleAttributes, resultTotalCount, resultTotalCount, update, updateMethods inherited from class de.xima.fc.api.ASubAPI
getHandlerProvider
-
Constructor Details
-
FormVersionAPI
public FormVersionAPI()
-
-
Method Details
-
create
Method for creating aFormVersionentity.- Parameters:
uc-UserContextthe user context in which the action is to be performed.formVersion-FormVersionwhich should be created.isFirstFormVersion-Booleanif this is the firstFormVersionor just a derivation of an existing one.- Returns:
FormVersionwhich was created.- Since:
- 2.4.3
-
getBy
Method for determining aFormVersionbased of aProjektand a version number.- Parameters:
uc-UserContextthe user context in which the action is to be performed.projekt-Projektin which theFormVersionis searched.formVersionNumber-Integerthe version number.- Returns:
FormVersionwhich was searched.- Since:
- 2.4.3
-
getByProjekt
Method for loading ofFormVersions of aProjekt. Methode zum Laden vonFormVersionen einesProjekts. This must be used in the frontend server to pick up the lazy-initialized list ofFormVersions.- Parameters:
uc-UserContextthe user context in which the action is to be performed.projekt-Projektfor which theFormVersions to be picked up.- Returns:
ListwithFormVersions.- Since:
- 2.4.3
-
getFormVersionCount
Method for determining the number ofFormVersions of aProjekt.- Parameters:
uc-UserContextthe user context in which the action is to be performed.projekt-Projektwhose number ofFormVersions should be determined.- Returns:
Integerthe number ofFormVersions.- Since:
- 2.4.3
-
getFormElemente
Method to submit allFormElements of aFormVersion. This must be used in the frontend server to pick up the lazy-initialized list ofFormElements.- Parameters:
uc-UserContextthe user context in which the action is to be performed.formVersion- for which the list ofFormElementshould be loaded.- Returns:
Listof typeFormElement.- Since:
- 2.4.3
-
getFormAsJSON
public com.alibaba.fastjson.JSONObject getFormAsJSON(UserContext uc, FormVersion fv) throws IOException, com.alibaba.fastjson.JSONException This method deliver the JSON for creating a XForm without any styles. This functionality is used for internal processing and ensures that the FD2 project remains independent.- Parameters:
uc-UserContextthe user context in which the action is to be performed.fv- theFormVersionwhich indicates which JSON should be loaded.- Returns:
- The form as JSON.
- Throws:
IOException- Error reading the form file.com.alibaba.fastjson.JSONException- Error converting form file content to a JSON.
-
getFormAsString
public String getFormAsString(UserContext uc, FormVersion fv) throws IOException, com.alibaba.fastjson.JSONException - Throws:
IOExceptioncom.alibaba.fastjson.JSONException
-
mergeFormElemente
@Deprecated public com.alibaba.fastjson.JSONObject mergeFormElemente(UserContext uc, FormVersion fv) throws com.alibaba.fastjson.JSONException, IOException Deprecated.- Throws:
com.alibaba.fastjson.JSONExceptionIOException
-