Package de.xima.fc.copy
Class ProcessCopyUtil
- java.lang.Object
-
- de.xima.fc.copy.ProcessCopyUtil
-
public class ProcessCopyUtil extends Object
Vorgehensweise beim Kopieren eines Vorganges:Vorgang clonedVorg = CopyHelper.clone(origVorg); // ...ggfs an Vorgangskopie noch andere Attribute setzen/überschreiben... // Vorgangskopie persistieren: DaoProvider.VORGANG_DAO.create(entityCtx, origVorg.getProjekt().getMandant(), clonedVorg); // nach der Persistierung hat die Vorgangskopie eine gültige Entitäts-ID und es kann weiter gehen: CopyHelper.setProzessUid(origVorg, clonedVorg); CopyHelper.copyAttachments(origVorg, clonedVorg);
-
-
Constructor Summary
Constructors Constructor Description ProcessCopyUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Vorgangclone(IEntityContext ec, Vorgang origVorgang)Deprecated.static Vorgangclone(IEntityContext ec, Vorgang origVorgang, boolean anonymize)Creates a copy of the given form record.static voidcloneSubmitsAndAttachToProcess(IEntityContext ec, Vorgang origProcess, Vorgang clonedProcess)Deprecated.static voidcloneSubmitsAndAttachToProcess(IEntityContext ec, Vorgang origProcess, Vorgang clonedProcess, boolean anonymize)Diese Methode dient dazu die Formeingänge eines Vorgangs zu klonen und diese einem neuen Vorgang hinzuzufügen.static Vorgangcopy(IEntityContext ec, Vorgang origin, Vorgang clone)Deprecated.static Vorgangcopy(IEntityContext ec, Vorgang origin, Vorgang clone, boolean anonymize)static voidcopyAttachments(IEntityContext ec, Vorgang originalVorgang, Vorgang clonedVorgang)Kopiert alle zumoriginalVorganggehörenden Dateien in das entsprechende Verzeichnis der Vorgangskopie.static voidsetProcessUUID(Vorgang origVorgang, Vorgang clonedVorgang)Deprecated.the uuid should not be changed anymore!
-
-
-
Method Detail
-
copy
public static Vorgang copy(IEntityContext ec, Vorgang origin, Vorgang clone, boolean anonymize)
-
clone
public static Vorgang clone(IEntityContext ec, Vorgang origVorgang, boolean anonymize)
Creates a copy of the given form record. The following modifications are applied to the copy:- the
idis set to0 - the
read flagis set tofalse - the
in progress flagflag is set tofalse - the
process IDis set to the empty string
Vorgang.getAttachments()of the original form record is replaced with a new list instance with the attachments. All entity references are copied as is, i.e. so that they reference the same object.- Parameters:
ec- Entity context to use for accessing the database.origVorgang- The form record to copy.anonymize-trueto anonymize theeditorRefandcreatorRef.- Returns:
- The copied form record with the modifications as described above.
- Since:
- 6.0.4
- the
-
cloneSubmitsAndAttachToProcess
public static void cloneSubmitsAndAttachToProcess(IEntityContext ec, Vorgang origProcess, Vorgang clonedProcess, boolean anonymize)
Diese Methode dient dazu die Formeingänge eines Vorgangs zu klonen und diese einem neuen Vorgang hinzuzufügen.
-
copyAttachments
public static void copyAttachments(IEntityContext ec, Vorgang originalVorgang, Vorgang clonedVorgang)
Kopiert alle zumoriginalVorganggehörenden Dateien in das entsprechende Verzeichnis der Vorgangskopie.- Parameters:
ec-IEntityContextthe entity-contextoriginalVorgang- - OriginalvorgangclonedVorgang- - Vorgangskopie
-
setProcessUUID
@Deprecated public static void setProcessUUID(Vorgang origVorgang, Vorgang clonedVorgang)
Deprecated.the uuid should not be changed anymore!- Parameters:
origVorgang-clonedVorgang-
-
cloneSubmitsAndAttachToProcess
@Deprecated public static void cloneSubmitsAndAttachToProcess(IEntityContext ec, Vorgang origProcess, Vorgang clonedProcess)
Deprecated.
-
copy
@Deprecated public static Vorgang copy(IEntityContext ec, Vorgang origin, Vorgang clone)
Deprecated.
-
clone
@Deprecated public static Vorgang clone(IEntityContext ec, Vorgang origVorgang)
Deprecated.
-
-