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 --(
AbstractEntity.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 vorgang,
IWorkflowProcessing processing,
IXForm xForm,
IFormDataAdapter formDataAdapter,
IEntityContext entityContext,
SessionAttributes sessionAttributes) |
| Modifier and Type | Method and Description |
|---|---|
void |
addProcessingResult(Integer aktionsId,
IProcessingResult value)
neues Aktionsergebnisobjekt hinzuzufügen
|
HashMap<Integer,IProcessingResult> |
getAktionsErgebnisse() |
IEntityContext |
getEntityContext() |
IFormDataAdapter |
getFormDataAdapter() |
IWorkflowProcessing |
getProcessing() |
SessionAttributes |
getSessionAttributes() |
String |
getTempDirPath(Aktion aktion)
temporäres Verzeichnis ermitteln, unter welchem Dateien dieses Kontexts abgelegt und gefunden werden können.
|
Vorgang |
getVorgang() |
IXForm |
getXForm() |
boolean |
hasKey(int aktionsId)
ermitteln, ob ein Eintrag zu einer Aktions-ID vorhanden ist
|
IProcessingResult |
instanceFor(int aktionsId)
spezifisches Aktionsergebnisobjekt anhand des Keys ermitteln
|
void |
setAktionsErgebnisse(HashMap<Integer,IProcessingResult> aktionsErgebnisse) |
void |
setEntityContext(IEntityContext entityContext) |
void |
setFormDataAdapter(IFormDataAdapter formDataAdapter) |
void |
setSessionAttributes(SessionAttributes sessionAttributes) |
void |
setVorgang(Vorgang vorgang) |
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(int aktionsId)
spezifisches Aktionsergebnisobjekt anhand des Keys ermitteln
|
String |
valueFor(int aktionId,
EProcessingResult eProcessingResult,
int index,
String key) |
protected static final org.slf4j.Logger LOG
public WorkflowProcessingContext(Vorgang vorgang, IWorkflowProcessing processing, IXForm xForm, IFormDataAdapter formDataAdapter, IEntityContext entityContext, SessionAttributes sessionAttributes)
vorgang - - der Vorgang für diesen Kontextpublic void addProcessingResult(Integer aktionsId, IProcessingResult value)
addProcessingResult in interface IWorkflowProcessingContextaktionsId - - Id der Aktion zu welcher die Aktionsergebnisobjekte zugeordnet werdenkey - - Key unter welchem das Aktionsergebnisobjekt zugreifbar sein sollvalue - - Value das eigentliche Aktionsergebnisobjekt das abgelegt werden sollpublic IProcessingResult instanceFor(int aktionsId)
aktionsId - - die Id der Aktion für die die Ergebnismenge ermittelt werden soll.key - - die Zeichenkette, die den Key darstellt für welchen das Aktionsergebnisobjekt ermittelt werden soll.public IProcessingResult valueFor(int aktionsId)
IWorkflowProcessingContextvalueFor in interface IWorkflowProcessingContextaktionsId - - die Id der Aktion für die die Ergebnismenge ermittelt werden soll.public String getTempDirPath(Aktion aktion) throws IOException
getTempDirPath in interface IWorkflowProcessingContextaktion - - für die der temporäre Dateipfad ermittelt werden sollIOException - - wenn ein Fehler beim Erzeugen des temporären Verzeichnisses auftrittpublic void shutdown()
throws IOException
shutdown in interface IWorkflowProcessingContextIOException - - wenn ein Fehler beim Löschen des temporären Verzeichnisses auftrittpublic boolean hasKey(int aktionsId)
hasKey in interface IWorkflowProcessingContextaktionsId - - ID der Aktion, deren Existenz geprüft werden solltrue wenn element vorhanden, ansonsten falsepublic String valueFor(int aktionId, EProcessingResult eProcessingResult, int index, String key)
valueFor in interface IWorkflowProcessingContextpublic IXForm getXForm()
getXForm in interface IWorkflowProcessingContextpublic Vorgang getVorgang()
getVorgang in interface IWorkflowProcessingContextpublic void setVorgang(Vorgang vorgang)
setVorgang in interface IWorkflowProcessingContextpublic IFormDataAdapter getFormDataAdapter()
getFormDataAdapter in interface IWorkflowProcessingContextpublic IEntityContext getEntityContext()
getEntityContext in interface IWorkflowProcessingContextpublic SessionAttributes getSessionAttributes()
getSessionAttributes in interface IWorkflowProcessingContextpublic HashMap<Integer,IProcessingResult> getAktionsErgebnisse()
public void setAktionsErgebnisse(HashMap<Integer,IProcessingResult> aktionsErgebnisse)
public void setxForm(IXForm xForm)
public void setFormDataAdapter(IFormDataAdapter formDataAdapter)
public void setEntityContext(IEntityContext entityContext)
public void setSessionAttributes(SessionAttributes sessionAttributes)
public IWorkflowProcessing getProcessing()
getProcessing in interface IWorkflowProcessingContextCopyright © 2016. All rights reserved.