public class AProjektUtil extends Object
| Modifier and Type | Field and Description | 
|---|---|
protected Mandant | 
client  | 
protected IEntityContext | 
ec  | 
protected List<FCMessage> | 
errorMsgList  | 
protected static String | 
FC_EXPORT_AKTIONEN  | 
protected static String | 
FC_EXPORT_AKTIVE_VERSION  | 
protected static String | 
FC_EXPORT_BEDINGUNG  | 
protected static String | 
FC_EXPORT_DOI  | 
protected static String | 
FC_EXPORT_DOI_DATA  | 
protected static String | 
FC_EXPORT_FORM_ELEMENTS  | 
protected static String | 
FC_EXPORT_FORM_RESSOURCES  | 
protected static String | 
FC_EXPORT_FORMVERSION  | 
protected static String | 
FC_EXPORT_FORMVERSION_DATA  | 
protected static String | 
FC_EXPORT_METADATA  | 
protected static String | 
FC_EXPORT_PROJEKT  | 
protected static String | 
FC_EXPORT_PROJEKTHELP  | 
protected static String | 
FC_EXPORT_RESOURCE  | 
protected static String | 
FC_EXPORT_STATUS  | 
protected static String | 
FC_EXPORT_STATUSHELP  | 
protected static String | 
FC_EXPORT_VORGAENGE  | 
protected static String | 
FC_EXPORT_VORGAENGE_DATA  | 
protected List<FCMessage> | 
infoMsgList  | 
protected Mandant | 
m
Deprecated.  
 | 
| Constructor and Description | 
|---|
AProjektUtil(Mandant man,
            IEntityContext ec)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
addErrorMessage(String i18nKey,
               Function<Locale,Serializable[]> params)  | 
protected void | 
addErrorMessage(String i18nKey,
               Serializable... param)  | 
protected void | 
addInfoMessage(String i18nKey,
              Function<Locale,Serializable[]> params)  | 
protected void | 
addInfoMessage(String i18nKey,
              Serializable... param)  | 
protected void | 
addWarnMessage(String i18nKey,
              Function<Locale,Serializable[]> params)  | 
protected void | 
addWarnMessage(String i18nKey,
              Serializable... param)  | 
protected void | 
checkClientResourceExists(ERessourcenTyp resourceType,
                         String resourceName)
Checks whether the given resource exists for the action and issues and error message in case it does not. 
 | 
static boolean | 
checkProjectAliasExist(IEntityContext ec,
                      String projectAlias,
                      Mandant client)
Checks whether or not the given project name already exist within the given client 
 | 
static boolean | 
checkProjectNameExist(IEntityContext ec,
                     String projectName,
                     Mandant client)
Checks whether or not the given project name already exist within the given client 
 | 
protected FormVersion | 
createActiveFormVersion(FormVersion neueFormversion,
                       Projekt neuesProjekt,
                       String formDir)
Erzeugt eine aktive FormVersion 
 | 
protected Map<Long,Aktion> | 
createAktion(Map<Long,Status> mapStatus,
            boolean disableAllActions)
Erstellt Aktionen anhand der StatusListe 
 | 
protected void | 
createAktionen(List<Status> statusListe,
              List<ExportAktionData> exportAktionListe,
              List<ExportBedingungData> exportBedingungListe)  | 
protected void | 
createBedingung(Map<Long,Aktion> aktionMap,
               Map<Long,Status> statusMap)
Erstellt Bedingungen anahnd der AktionsListe 
 | 
protected List<ExportBedingungData> | 
createBedingungenExportData(List<ExportBedingungData> exportBedingungListe,
                           Projekt project)  | 
protected void | 
createFile(String filePath,
          byte[] data)  | 
protected void | 
createFormElements(List<FormElement> formElements,
                  FormVersion formVersion)
Erzeugt ein FormElement 
 | 
protected void | 
createFormVersionFile(FormVersion fv,
                     String targetPath)  | 
protected <T extends de.xima.cmn.dao.interfaces.IEntity<Long>> | 
createIDsMap(List<T> options)
Generiert aus einer Liste von  
IEntity-Objekten eine Map mit ID als Key | 
protected JAXBContext | 
createJAXBContext(Class<?>[] classesToBeBound,
                 List<String> bindings)
Erzeugen und Zurückliefern eines JAXBContexts. 
 | 
protected <T extends INameProviding> | 
createNamedMap(List<T> options)
Generiert aus einer Liste von  
INameProviding-Objekten eine Map mit Name als Key | 
static FormVersion | 
createNewFormVersion(IEntityContext ec,
                    Long projectId,
                    Benutzer user)  | 
static FormVersion | 
createNewFormVersion(IEntityContext ec,
                    Projekt project,
                    Benutzer user)  | 
protected List<Status> | 
createPreStatus(HashMap<Long,Status> existierendeStatusListe,
               List<Status> altStatusListe)  | 
protected ProjektRessource | 
createProjektRessource(Projekt neuesProjekt,
                      File file)  | 
protected void | 
createProjektRessourcenFiles(Projekt projekt,
                            String targetPath)  | 
protected void | 
createProjektRessources(Projekt neuesProjekt,
                       File resFile)  | 
protected HashMap<Long,Status> | 
createStatus(List<? extends Status> altStatusListe,
            Projekt projekt)
Methode zum Erzeugen eines Status 
 | 
protected <T> T | 
deproxyEntity(T obj)  | 
String | 
findUniqueAlias(String alias)
Attempt to find a unique alias (for the current client). 
 | 
protected List<Aktion> | 
getAktionsListe(Status status)
Methode zum Erzeugen der Aktion-Daten 
 | 
protected List<BenutzerGruppe> | 
getBenutzergruppen(List<BenutzerGruppe> bgl)
Methode zum Auslesen der Benutzergruppen 
 | 
protected List<BenutzerGruppe> | 
getBenutzerGruppenListe(List<BenutzerGruppe> benutzerGruppen)
liest Benutzergruppen aus der DB 
 | 
List<FCMessage> | 
getErrorMsgList()  | 
protected List<FormElement> | 
getFormElements(FormVersion formVersion)
Methode zum Ermitteln der FormElements 
 | 
protected List<String> | 
getFormVersionBindings()  | 
protected com.google.gson.GsonBuilder | 
getGsonBuilderWithDefaults()
The defaults that are currently set are as follows:
 
 A custom type adapter for Date objects as the built-in one is not cross Java version compatible. 
 | 
List<FCMessage> | 
getInfoMsgList()  | 
protected Mandant | 
getMandant()  | 
protected List<MandantFrontendServer> | 
getMandantFrontendServer(List<MandantFrontendServer> bgl)
Methode zum Auslesen der MandantFrontendServer 
 | 
protected Projekt | 
getNewProjekt(Projekt newProject,
             Projekt sourceProjekt,
             String curBenutzer)
Erzeugt ein neues Projekt 
 | 
protected Collection<ProjektRessource> | 
getProjektRessources(FormVersion formVersion)  | 
protected List<Status> | 
getStatusListe(Projekt projekt)
Methode zum Erzeugen der Status-Daten 
 | 
protected List<String> | 
getVorgangsBindings()  | 
protected Aktion | 
handleAction(long oldActionId,
            Aktion newAction,
            Map<Long,Aktion> aktionMap,
            Map<Long,Status> statusMap,
            ExportBedingungData exportBedingungData)  | 
protected Bedingung | 
handleBedingungForImport(Bedingung neueBedingung,
                        Map<Long,Aktion> aktionMap,
                        Map<Long,Status> statusMap,
                        ExportBedingungData exportBedingungData)
Should only be used for importing older project exports 
 | 
protected void | 
importProjektRessources(Projekt neuesProjekt,
                       String resDirname,
                       String resFilename)  | 
protected void | 
updatePreviewImage(Projekt newProject,
                  Projekt sourceProject)  | 
protected void | 
writeJSONtoFile(File tempDir,
               String filename,
               String content)  | 
protected final IEntityContext ec
protected final Mandant client
protected static final String FC_EXPORT_PROJEKT
protected static final String FC_EXPORT_PROJEKTHELP
protected static final String FC_EXPORT_AKTIVE_VERSION
protected static final String FC_EXPORT_DOI
protected static final String FC_EXPORT_DOI_DATA
protected static final String FC_EXPORT_FORM_ELEMENTS
protected static final String FC_EXPORT_STATUS
protected static final String FC_EXPORT_STATUSHELP
protected static final String FC_EXPORT_AKTIONEN
protected static final String FC_EXPORT_BEDINGUNG
protected static final String FC_EXPORT_FORMVERSION
protected static final String FC_EXPORT_FORMVERSION_DATA
protected static final String FC_EXPORT_FORM_RESSOURCES
protected static final String FC_EXPORT_RESOURCE
protected static final String FC_EXPORT_VORGAENGE
protected static final String FC_EXPORT_VORGAENGE_DATA
@Deprecated protected final Mandant m
protected static final String FC_EXPORT_METADATA
public AProjektUtil(Mandant man, IEntityContext ec)
protected void addErrorMessage(String i18nKey, Serializable... param)
protected void addErrorMessage(String i18nKey, Function<Locale,Serializable[]> params)
protected void addWarnMessage(String i18nKey, Serializable... param)
protected void addWarnMessage(String i18nKey, Function<Locale,Serializable[]> params)
public static final FormVersion createNewFormVersion(IEntityContext ec, Long projectId, Benutzer user)
public static final FormVersion createNewFormVersion(IEntityContext ec, Projekt project, Benutzer user)
protected void createFile(String filePath, byte[] data) throws IOException
IOExceptionprotected void addInfoMessage(String i18nKey, Serializable... param)
protected void addInfoMessage(String i18nKey, Function<Locale,Serializable[]> params)
protected Mandant getMandant()
protected void writeJSONtoFile(File tempDir, String filename, String content) throws IOException
IOExceptionprotected List<FormElement> getFormElements(FormVersion formVersion)
formVersion - public String findUniqueAlias(String alias) throws LimitExceededException
alias - Desired base alias to be used.LimitExceededException - if the alias generation exceeded the length limitpublic static final boolean checkProjectNameExist(IEntityContext ec, String projectName, Mandant client)
ec - IEntityContext in which this action should be performedprojectName - String project name to check forclient - Mandant to check fortrue if name already existspublic static final boolean checkProjectAliasExist(IEntityContext ec, String projectAlias, Mandant client)
ec - IEntityContext in which this action should be performedprojectAlias - String project alias to check forclient - Mandant to check fortrue if alias already existsprotected void checkClientResourceExists(ERessourcenTyp resourceType, String resourceName)
resourceType - Type of resource. No check is performed unless this is ERessourcenTyp.MANDANT.resourceName - Name of the resource to check.protected List<Status> getStatusListe(Projekt projekt)
projekt - protected List<Aktion> getAktionsListe(Status status)
status - protected Aktion handleAction(long oldActionId, Aktion newAction, Map<Long,Aktion> aktionMap, Map<Long,Status> statusMap, ExportBedingungData exportBedingungData) throws Exception
Exceptionprotected Bedingung handleBedingungForImport(Bedingung neueBedingung, Map<Long,Aktion> aktionMap, Map<Long,Status> statusMap, ExportBedingungData exportBedingungData) throws Exception
Exceptionprotected void createBedingung(Map<Long,Aktion> aktionMap, Map<Long,Status> statusMap) throws Exception
aktionMap - statusMap - Exceptionprotected Map<Long,Aktion> createAktion(Map<Long,Status> mapStatus, boolean disableAllActions)
mapStatus - disableAllActions - Flag das angibt, ob neue Aktionen deaktiviert werden sollenprotected Projekt getNewProjekt(Projekt newProject, Projekt sourceProjekt, String curBenutzer)
newProject - curBenutzer - protected FormVersion createActiveFormVersion(FormVersion neueFormversion, Projekt neuesProjekt, String formDir) throws IOException, com.alibaba.fastjson.JSONException
neueFormversion - neuesProjekt - IOExceptioncom.alibaba.fastjson.JSONExceptionprotected void createFormElements(List<FormElement> formElements, FormVersion formVersion)
formElements - targetFormversion - protected List<BenutzerGruppe> getBenutzergruppen(List<BenutzerGruppe> bgl)
bgl - protected List<MandantFrontendServer> getMandantFrontendServer(List<MandantFrontendServer> bgl)
bgl - protected HashMap<Long,Status> createStatus(List<? extends Status> altStatusListe, Projekt projekt)
altStatusListe - projekt - protected List<BenutzerGruppe> getBenutzerGruppenListe(List<BenutzerGruppe> benutzerGruppen)
benutzerGruppen - protected List<Status> createPreStatus(HashMap<Long,Status> existierendeStatusListe, List<Status> altStatusListe)
existierendeStatusListe - altStatusListe - protected List<ExportBedingungData> createBedingungenExportData(List<ExportBedingungData> exportBedingungListe, Projekt project)
protected void createProjektRessourcenFiles(Projekt projekt, String targetPath) throws IOException
IOExceptionprotected Collection<ProjektRessource> getProjektRessources(FormVersion formVersion)
protected void createFormVersionFile(FormVersion fv, String targetPath) throws IOException
IOExceptionprotected void createAktionen(List<Status> statusListe, List<ExportAktionData> exportAktionListe, List<ExportBedingungData> exportBedingungListe)
protected void importProjektRessources(Projekt neuesProjekt, String resDirname, String resFilename) throws IOException
IOExceptionprotected void createProjektRessources(Projekt neuesProjekt, File resFile) throws IOException
IOExceptionprotected ProjektRessource createProjektRessource(Projekt neuesProjekt, File file) throws IOException
IOExceptionprotected <T> T deproxyEntity(T obj)
protected com.google.gson.GsonBuilder getGsonBuilderWithDefaults()
GsonBuilder with some defaults already set.protected JAXBContext createJAXBContext(Class<?>[] classesToBeBound, List<String> bindings) throws JAXBException
classesToBeBound - JAXBExceptionprotected <T extends INameProviding> Map<String,T> createNamedMap(List<T> options)
INameProviding-Objekten eine Map mit Name als Keyoptions - Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.