public class WorkflowProcessingContext extends Object implements IWorkflowProcessingContext
Object. Beim Auslesen könnte ein Type-Cast
notwendig werden. Zum Ermitteln eines Wertes muss folgende Objekt-Kette ausgebaut werden:
WorkflowProcessingContextManager --(Vorgang.getProzessId())--> WorkflowProcessingContext --(
Aktion.getId())--> Aktionsergebnisobjekt(Key:Value)
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOG
Beinhaltet die Zuordnung zwischen Aktion und Aktionsergebnisobjekten Die Aktionsergebnisobjekte sind
Key-Value-Paare, die in Form einer Map in einer dieser Map abgelegt werden und anhand der AktionsId zugreifbar
sind.
|
| Constructor and Description |
|---|
WorkflowProcessingContext(Vorgang process,
IWorkflowProcessing processing,
IXForm xForm,
IXFormRenderConfig xformConfig,
IFormDataAdapter formDataAdapter,
IEntityContext entityContext,
Map<String,Serializable> sessionAttributes) |
| Modifier and Type | Method and Description |
|---|---|
void |
addProcessingResult(Integer aktionsId,
IProcessingResult value)
neues Aktionsergebnisobjekt hinzuzufügen
|
void |
addProcessingResult(long aktionsId,
IProcessingResult value)
neues Aktionsergebnisobjekt hinzuzufügen
|
void |
close() |
HashMap<Long,IProcessingResult> |
getAktionsErgebnisse() |
IConsumingFileHandler |
getConsumingFileHandler() |
IEntityContext |
getEntityContext() |
String |
getFilename(String targetName) |
IFormDataAdapter |
getFormDataAdapter() |
IWorkflowProcessing |
getProcessing() |
IProvidingFileHandler |
getProvidingFileHandler() |
Map<String,Serializable> |
getSessionAttributeMap() |
SessionAttributes |
getSessionAttributes()
Deprecated.
|
File |
getSourceDir(Aktion aktion)
Path to the temporary source directory.
|
String |
getSourceDirPath(Aktion aktion)
Path to the temporary source directory.
|
<E extends IFileDataEntity<?>> |
getSourceFile(Aktion aktion,
IFileProviding<?,E> file)
Methode zum Ermitteln und temporären Ablegen von Dateien aus der Datenbank.
|
File |
getTargetDir(Aktion aktion)
Path to the temporary target directory.
|
String |
getTargetDirPath(Aktion aktion)
Path to the temporary target directory.
|
String |
getTempDirPath(Aktion aktion)
Deprecated.
|
Vorgang |
getVorgang() |
IXForm |
getXForm() |
IXFormRenderConfig |
getXFormRenderConfig() |
boolean |
hasKey(long aktionsId)
ermitteln, ob ein Eintrag zu einer Aktions-ID vorhanden ist
|
IProcessingResult |
instanceFor(long aktionsId)
spezifisches Aktionsergebnisobjekt anhand des Keys ermitteln
|
void |
setAktionsErgebnisse(HashMap<Long,IProcessingResult> aktionsErgebnisse) |
void |
setEntityContext(IEntityContext entityContext) |
void |
setFormDataAdapter(IFormDataAdapter formDataAdapter) |
void |
setSessionAttributes(Map<String,Serializable> sessionAttributes) |
void |
setSessionAttributes(SessionAttributes sessionAttributes)
Deprecated.
|
void |
setVorgang(Vorgang vorgang) |
void |
setxForm(IXForm xForm)
Deprecated.
use
setXForm(IXForm) |
void |
setXForm(IXForm xForm) |
void |
shutdown()
alle geöffneten Referenzen des Kontexts schließen und temporär angelegte Dateien löschen (sollte erst passieren,
wenn der Statuswechsel vollzogen ist und kein Kontext mehr benötigt wird)
|
IProcessingResult |
valueFor(long aktionsId)
Find the processing result for a given action.
|
String |
valueFor(long aktionId,
EProcessingResult eProcessingResult,
int index,
String key)
|
protected static final org.slf4j.Logger LOG
public WorkflowProcessingContext(Vorgang process, IWorkflowProcessing processing, IXForm xForm, IXFormRenderConfig xformConfig, IFormDataAdapter formDataAdapter, IEntityContext entityContext, Map<String,Serializable> sessionAttributes)
process - the processprocessing - the IWorkflowProcessingxForm - the IXFormxformConfig - the IXFormRenderConfigformDataAdapter - the IFormDataAdapterentityContext - the IEntityContextsessionAttributes - a map of session attributespublic void addProcessingResult(Integer aktionsId, IProcessingResult value)
addProcessingResult in interface IWorkflowProcessingContextaktionsId - - Id der Aktion zu welcher die Aktionsergebnisobjekte zugeordnet werdenvalue - - Value das eigentliche Aktionsergebnisobjekt das abgelegt werden sollpublic void addProcessingResult(long aktionsId,
IProcessingResult value)
addProcessingResult in interface IWorkflowProcessingContextaktionsId - - Id der Aktion zu welcher die Aktionsergebnisobjekte zugeordnet werdenvalue - - Value das eigentliche Aktionsergebnisobjekt das abgelegt werden sollpublic IProcessingResult instanceFor(long aktionsId)
aktionsId - - die Id der Aktion für die die Ergebnismenge ermittelt werden soll.public IProcessingResult valueFor(long aktionsId)
IWorkflowProcessingContextvalueFor in interface IWorkflowProcessingContextaktionsId - The ID of the Aktionnull otherwise.@Deprecated public String getTempDirPath(Aktion aktion) throws IOException
getTargetDirPath(Aktion)getTempDirPath in interface IWorkflowProcessingContextIOExceptionpublic String getTargetDirPath(Aktion aktion) throws IOException
IWorkflowProcessingContextgetTargetDirPath in interface IWorkflowProcessingContextaktion - The Aktion for which the target directory should be returned.IOException - When the the target directory could not be acquired or created.IWorkflowProcessingContext.getTargetDir(Aktion)public File getTargetDir(Aktion aktion) throws IOException
IWorkflowProcessingContextgetTargetDir in interface IWorkflowProcessingContextaktion - The Aktion for which the target directory should be returned.IOException - When the the target directory could not be acquired or created.IWorkflowProcessingContext.getTargetDirPath(Aktion)public File getSourceDir(Aktion aktion) throws IOException
IWorkflowProcessingContextIWorkflowProcessingContext.getTargetDir(Aktion). The directory path that is returned will refer to a directory that exists on the
file system (if necessary, it is created when calling this method). The directory will be deleted once workflow
processing finishes.getSourceDir in interface IWorkflowProcessingContextaktion - The Aktion for which the source directory should be returned.IOException - When the the source directory could not be acquired or created.IWorkflowProcessingContext.getSourceDirPath(Aktion)public String getSourceDirPath(Aktion aktion) throws IOException
IWorkflowProcessingContextIWorkflowProcessingContext.getTargetDirPath(Aktion). The directory path that is returned will refer to a directory that exists on
the file system (if necessary, it is created when calling this method). The directory will be deleted once workflow
processing finishes.getSourceDirPath in interface IWorkflowProcessingContextaktion - The Aktion for which the source directory should be returned.IOException - When the the source directory could not be acquired or created.IWorkflowProcessingContext.getSourceDir(Aktion)public IConsumingFileHandler getConsumingFileHandler()
getConsumingFileHandler in interface IWorkflowProcessingContextpublic IProvidingFileHandler getProvidingFileHandler()
getProvidingFileHandler in interface IWorkflowProcessingContextpublic <E extends IFileDataEntity<?>> File getSourceFile(Aktion aktion, IFileProviding<?,E> file) throws IOException
IWorkflowProcessingContextIWorkflowProcessingContext.getSourceDir(Aktion) abgelegt und werden entsprechend beim Schließen des Kontextes mit gelöscht.getSourceFile in interface IWorkflowProcessingContextaktion - Aktion die Aktion in welcher die Datei zur Verfügung gestellt werden sollfile - IFileProviding Die Entität dessen Datei ausgelesen werden sollFile die temporär abgelegte DateiIOException - wenn Fehler beim Anlegen der Datei auftretenpublic String getFilename(String targetName)
getFilename in interface IWorkflowProcessingContexttargetName - A possibly unsafe name (user input) that you would like to use a a filename.IWorkflowProcessingContext.getTargetDir(Aktion),
IWorkflowProcessingContext.getTargetDirPath(Aktion)public void shutdown()
throws IOException
shutdown in interface IWorkflowProcessingContextIOException - - wenn ein Fehler beim Löschen des temporären Verzeichnisses auftrittpublic boolean hasKey(long aktionsId)
hasKey in interface IWorkflowProcessingContextaktionsId - - ID der Aktion, deren Existenz geprüft werden solltrue wenn element vorhanden, ansonsten falsepublic String valueFor(long aktionId, EProcessingResult eProcessingResult, int index, String key)
IWorkflowProcessingContextList of Maps as the result. This method find the result
value at a given index and key.valueFor in interface IWorkflowProcessingContextaktionId - The ID of an Aktion for which to find the processing value.eProcessingResult - The type of expected processing result.index - Zero-based index indicating which processing value to return. Ignored unless the
processingResult is set to EProcessingResult.RESULT.key - Key indicating which value to return.public IXForm getXForm()
getXForm in interface IWorkflowProcessingContextIXForm for the current form record.public IXFormRenderConfig getXFormRenderConfig()
getXFormRenderConfig in interface IWorkflowProcessingContextpublic Vorgang getVorgang()
getVorgang in interface IWorkflowProcessingContextVorgang for which workflow processing is executed.public void setVorgang(Vorgang vorgang)
setVorgang in interface IWorkflowProcessingContextpublic IFormDataAdapter getFormDataAdapter()
getFormDataAdapter in interface IWorkflowProcessingContextIFormDataAdapter for the current form record that can be used to access the current form data.public void setFormDataAdapter(IFormDataAdapter formDataAdapter)
public IEntityContext getEntityContext()
getEntityContext in interface IWorkflowProcessingContextIEntityContext that can be used to access the database.public HashMap<Long,IProcessingResult> getAktionsErgebnisse()
public void setAktionsErgebnisse(HashMap<Long,IProcessingResult> aktionsErgebnisse)
public void setXForm(IXForm xForm)
public void setEntityContext(IEntityContext entityContext)
public IWorkflowProcessing getProcessing()
getProcessing in interface IWorkflowProcessingContextpublic Map<String,Serializable> getSessionAttributeMap()
getSessionAttributeMap in interface IWorkflowProcessingContextHttpSession. Changes to this map will not
be reflected or apply to the HttpSession.public void setSessionAttributes(Map<String,Serializable> sessionAttributes)
public void close()
close in interface Closeableclose in interface AutoCloseable@Deprecated public void setSessionAttributes(SessionAttributes sessionAttributes)
@Deprecated public SessionAttributes getSessionAttributes()
getSessionAttributes in interface IWorkflowProcessingContext@Deprecated public void setxForm(IXForm xForm)
setXForm(IXForm)Copyright © 2020 XIMA MEDIA GmbH. All rights reserved.