Class PrintJob
- java.lang.Object
-
- de.xima.fc.mdl.print.PrintJob
-
- All Implemented Interfaces:
Serializable
public class PrintJob extends Object implements Serializable
Model class for a print job. It contains all information needed to print a form, including the form version, the process, the user and the workflow state.Hint: All entities are stored as transient fields and only their IDs are stored as persistent fields. This is done because the print job is serialized and sent to other nodes in the cluster, where the entities are retrieved from the database again. This leads to a better performance and less memory usage, because the entities are not serialized and sent over the network. It also means, that any in-memory changes to the entities are not reflected in the result of the print job.
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PrintJob(FormVersion formVersion)Creates a new print job for the given form version.PrintJob(Vorgang vorgang)Creates a new print job for the given process.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description BenutzergetBenutzer()Deprecated.longgetCreatedAt()FormVersiongetFormVersion()LonggetFormVersionId()StringgetJobID()LonggetProcessID()StatusgetStatus()Deprecated.LonggetStatusId()Deprecated.IUsergetUser()VorganggetVorgang()WorkflowStategetWorkflowState()LonggetWorkflowStateId()booleanisEntitiesLoaded()booleanisHideRequiredHint()booleanisUsesNewWorkflow()voidmarkEntitiesLoaded()booleanneedsReload()voidsetBenutzer(Benutzer benutzer)Deprecated.voidsetFormVersion(FormVersion formVersion)Sets the form version for this print job.voidsetHideRequiredHint(boolean hideRequiredHint)voidsetJobID(String jobID)voidsetStatus(Status status)Deprecated.UsesetWorkflowState(WorkflowState)and the new workflow engine.voidsetUser(IUser user)voidsetUsesNewWorkflow(boolean usesNewWorkflow)voidsetVorgang(Vorgang vorgang)Sets the process for this print job.voidsetWorkflowState(WorkflowState workflowState)Sets the workflow state for this print job.
-
-
-
Constructor Detail
-
PrintJob
public PrintJob(Vorgang vorgang)
Creates a new print job for the given process. The form version and status are retrieved from the process.Hint: Any in-memory changes to the entities may get lost during the print itself, because the print job could be serialized and shared with other nodes in the cluster.
- Parameters:
vorgang- The process to print.
-
PrintJob
public PrintJob(FormVersion formVersion)
Creates a new print job for the given form version. The process and status are not set.Hint: Any in-memory changes to the entities may get lost during the print itself, because the print job could be serialized and shared with other nodes in the cluster.
- Parameters:
formVersion- The form version to print.
-
-
Method Detail
-
setVorgang
public void setVorgang(Vorgang vorgang)
Sets the process for this print job.Hint: Any in-memory changes to the entities may get lost during the print itself, because the print job could be serialized and shared with other nodes in the cluster.
- Parameters:
vorgang- the process to set
-
setFormVersion
public void setFormVersion(FormVersion formVersion)
Sets the form version for this print job.Hint: Any in-memory changes to the entities may get lost during the print itself, because the print job could be serialized and shared with other nodes in the cluster.
- Parameters:
formVersion- the form version to set
-
setWorkflowState
public void setWorkflowState(WorkflowState workflowState)
Sets the workflow state for this print job.Hint: Any in-memory changes to the entities may get lost during the print itself, because the print job could be serialized and shared with other nodes in the cluster.
- Parameters:
workflowState- The current state for the new workflow engine. The form is rendered with this state.
-
setStatus
@Deprecated public void setStatus(Status status)
Deprecated.UsesetWorkflowState(WorkflowState)and the new workflow engine.Sets the status for this print job.Hint: Any in-memory changes to the entities may get lost during the print itself, because the print job could be serialized and shared with other nodes in the cluster.
- Parameters:
status- the status to set
-
needsReload
public boolean needsReload()
-
markEntitiesLoaded
public void markEntitiesLoaded()
-
isEntitiesLoaded
public boolean isEntitiesLoaded()
-
getJobID
public String getJobID()
-
getCreatedAt
public long getCreatedAt()
-
getUser
public IUser getUser()
-
getVorgang
public Vorgang getVorgang()
-
getProcessID
public Long getProcessID()
-
getFormVersion
public FormVersion getFormVersion()
-
getFormVersionId
public Long getFormVersionId()
-
getWorkflowState
public WorkflowState getWorkflowState()
-
getWorkflowStateId
public Long getWorkflowStateId()
-
isUsesNewWorkflow
public boolean isUsesNewWorkflow()
-
isHideRequiredHint
public boolean isHideRequiredHint()
-
getBenutzer
@Deprecated public Benutzer getBenutzer()
Deprecated.
-
getStatus
@Deprecated public Status getStatus()
Deprecated.
-
getStatusId
@Deprecated public Long getStatusId()
Deprecated.
-
setJobID
public void setJobID(String jobID)
-
setUser
public void setUser(IUser user)
-
setUsesNewWorkflow
public void setUsesNewWorkflow(boolean usesNewWorkflow)
-
setHideRequiredHint
public void setHideRequiredHint(boolean hideRequiredHint)
-
setBenutzer
@Deprecated public void setBenutzer(Benutzer benutzer)
Deprecated.
-
-