public abstract class PrintJobStatus
extends java.lang.Object
| Constructor and Description |
|---|
PrintJobStatus(java.lang.String referenceId,
java.lang.String appId,
java.util.Date completionDate,
java.lang.String fileName,
AccessAssertion accessAssertion)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addExtraParameters(org.json.JSONObject metadata)
Add extra information to the metadata object being put in the registry.
|
AccessAssertion |
getAccess() |
java.lang.String |
getAppId() |
java.util.Date |
getCompletionDate() |
java.lang.String |
getFileName() |
java.lang.String |
getReferenceId() |
static com.google.common.base.Optional<? extends PrintJobStatus> |
load(java.lang.String referenceId,
Registry registry,
AccessAssertionPersister persister)
Construct a print job by reading the data from a registry.
|
void |
store(Registry registry,
AccessAssertionPersister persister)
Store the data of a print job in the registry.
|
public PrintJobStatus(java.lang.String referenceId,
java.lang.String appId,
java.util.Date completionDate,
java.lang.String fileName,
AccessAssertion accessAssertion)
referenceId - reference of the report.appId - the appId used for loading the configuration.fileName - the fileName to send to the client.completionDate - the time when the print job ended.accessAssertion - the an access control object for downloading this report. Typically this is combined access of the
template and the configuration.public final void store(Registry registry, AccessAssertionPersister persister) throws org.json.JSONException
registry - the registry to writer topersister - a persister for converting the access assertion to jsonorg.json.JSONExceptionprotected abstract void addExtraParameters(org.json.JSONObject metadata)
throws org.json.JSONException
metadata - the json object that contains the metadataorg.json.JSONExceptionpublic static com.google.common.base.Optional<? extends PrintJobStatus> load(java.lang.String referenceId, Registry registry, AccessAssertionPersister persister) throws org.json.JSONException, NoSuchReferenceException
referenceId - the reference id of the report to get information about.registry - the registry to read from.persister - the access persister to use for reading the access data from the registryorg.json.JSONExceptionNoSuchReferenceExceptionpublic final java.lang.String getReferenceId()
public final java.lang.String getAppId()
public final java.lang.String getFileName()
public final java.util.Date getCompletionDate()
public final AccessAssertion getAccess()