public class FormVersionAPI extends AEntityAPI<FormVersion>
FormVersion
entities.entityClass
Constructor and Description |
---|
FormVersionAPI() |
Modifier and Type | Method and Description |
---|---|
FormVersion |
create(UserContext uc,
FormVersion formVersion,
boolean isFirstFormVersion)
Method for creating a
FormVersion entity. |
FormVersion |
getBy(UserContext uc,
Projekt projekt,
int formVersionNumber)
Method for determining a
FormVersion based of a Projekt and a version number. |
List<FormVersion> |
getByProjekt(UserContext uc,
Projekt projekt)
Method for loading of
FormVersion s of a Projekt . |
com.alibaba.fastjson.JSONObject |
getFormAsJSON(UserContext uc,
FormVersion fv)
This method deliver the JSON for creating a
XForm without any styles. |
String |
getFormAsString(UserContext uc,
FormVersion fv) |
List<FormElement> |
getFormElemente(UserContext uc,
FormVersion formVersion)
Method to submit all
FormElement s of a FormVersion . |
int |
getFormVersionCount(UserContext uc,
Projekt projekt)
Method for determining the number of
FormVersion s of a Projekt . |
com.alibaba.fastjson.JSONObject |
mergeFormElemente(UserContext uc,
FormVersion fv)
Deprecated.
|
create, create, delete, delete, deleteAllBy, deleteById, deleteById, getAll, getAllBy, getBy, getById, getById, resultTotalCount, update, update
getHandlerProvider
public FormVersion create(UserContext uc, FormVersion formVersion, boolean isFirstFormVersion)
FormVersion
entity.uc
- UserContext
the user context in which the action is to be performed.formVersion
- FormVersion
which should be created.isFirstFormVersion
- Boolean
if this is the first FormVersion
or just a derivation of an
existing one.FormVersion
which was created.public FormVersion getBy(UserContext uc, Projekt projekt, int formVersionNumber)
FormVersion
based of a Projekt
and a version number.uc
- UserContext
the user context in which the action is to be performed.projekt
- Projekt
in which the FormVersion
is searched.formVersionNumber
- Integer
the version number.FormVersion
which was searched.public List<FormVersion> getByProjekt(UserContext uc, Projekt projekt)
FormVersion
s of a Projekt
. Methode zum Laden von FormVersion
en eines
Projekt
s. This must be used in the frontend server to pick up the lazy-initialized list of
FormVersion
s.uc
- UserContext
the user context in which the action is to be performed.projekt
- Projekt
for which the FormVersion
s to be picked up.List
with FormVersion
s.public int getFormVersionCount(UserContext uc, Projekt projekt)
FormVersion
s of a Projekt
.uc
- UserContext
the user context in which the action is to be performed.projekt
- Projekt
whose number of FormVersion
s should be determined.Integer
the number of FormVersion
s.public List<FormElement> getFormElemente(UserContext uc, FormVersion formVersion)
FormElement
s of a FormVersion
. This must be used in the frontend server to
pick up the lazy-initialized list of FormElement
s.uc
- UserContext
the user context in which the action is to be performed.formVersion
- for which the list of FormElement
should be loaded.List
of type FormElement
.public com.alibaba.fastjson.JSONObject getFormAsJSON(UserContext uc, FormVersion fv) throws IOException, com.alibaba.fastjson.JSONException
XForm
without any styles. This functionality is used for
internal processing and ensures that the FD2 project remains independent.uc
- UserContext
the user context in which the action is to be performed.fv
- the FormVersion
which indicates which JSON should be loaded.IOException
- Error reading the form file.com.alibaba.fastjson.JSONException
- Error converting form file content to a JSON.public String getFormAsString(UserContext uc, FormVersion fv) throws IOException, com.alibaba.fastjson.JSONException
IOException
com.alibaba.fastjson.JSONException
@Deprecated public com.alibaba.fastjson.JSONObject mergeFormElemente(UserContext uc, FormVersion fv) throws com.alibaba.fastjson.JSONException, IOException
com.alibaba.fastjson.JSONException
IOException
Copyright © 2019 XIMA MEDIA GmbH. All rights reserved.