public abstract class PrintJob extends java.lang.Object implements java.util.concurrent.Callable<PrintJobStatus>
| Modifier and Type | Class and Description |
|---|---|
protected static interface |
PrintJob.PrintAction
Interface encapsulating the code to run with the open output stream.
|
| Constructor and Description |
|---|
PrintJob() |
| Modifier and Type | Method and Description |
|---|---|
PrintJobStatus |
call() |
void |
configureAccess(Template template)
Configure the access permissions required to access this print job.
|
AccessAssertion |
getAccess() |
protected java.lang.String |
getAppId() |
java.lang.Long |
getCreateTime() |
java.util.Date |
getCreateTimeAsDate() |
java.lang.String |
getReferenceId()
Get the reference id of the job so it can be looked up again later.
|
void |
setCreateTime(java.lang.Long createTime) |
void |
setReferenceId(java.lang.String referenceId)
Set the reference id of the job so it can be looked up again later.
|
void |
setRequestData(PJsonObject requestData)
Set the data from the client making the request.
|
void |
setSecurityContext(org.springframework.security.core.context.SecurityContext securityContext)
The security context that contains the information about the user that made the request.
|
protected abstract java.net.URI |
withOpenOutputStream(PrintJob.PrintAction function)
Open an OutputStream and execute the function using the OutputStream.
|
public final java.lang.String getReferenceId()
public final void setReferenceId(java.lang.String referenceId)
referenceId - the referenceIdpublic final java.lang.Long getCreateTime()
public final java.util.Date getCreateTimeAsDate()
public final void setCreateTime(java.lang.Long createTime)
public final void setRequestData(PJsonObject requestData)
requestData - the json dataprotected abstract java.net.URI withOpenOutputStream(PrintJob.PrintAction function) throws java.lang.Throwable
function - the function to executejava.lang.Throwablepublic final PrintJobStatus call() throws java.lang.Exception
call in interface java.util.concurrent.Callable<PrintJobStatus>java.lang.Exceptionprotected final java.lang.String getAppId()
public final void setSecurityContext(org.springframework.security.core.context.SecurityContext securityContext)
SecurityContextHolder when the thread starts executing.securityContext - the conext objectpublic final AccessAssertion getAccess()
public final void configureAccess(Template template)
template - the containing print template which should have sufficient information to configure the access.