Interface IDocumentServiceBF
- All Known Subinterfaces:
IDocumentServiceExtBF
This service supports a variety of so called "document processors" (see getSupportedProcessors()
),
based on the format of the supported document layout templates.
The list of supported processors and their capabilities depend on the
installed version (service pack) and licensed modules.
The document service provides the following functionality:
- Document templates maintenance (the templates are stored in the service and can be referenced from outside)
- Document creation (single documents can be created when the required data and a template reference is passed from outside)
- Document staging and archiving (the created documents are maintained for a short period and long-term archived, if archive is licensed and configured)
- Document types maintenance (a document type references a document template and can contain some additional settings for printing and archiving)
- Document reference objects maintenance (each document can be assigned to a "deputy" business object for easier searching and categorizing)
- Document printing (supported only with the AEB Cloud Printing Server installed in the customer's network)
There are basically three ways how the document service can be used:
- On-demand documents: The document is generated synchronously but not stored (see
createDocument(CreateDocumentRequestDTO)
). - Staged documents: The document is generated synchronously or asynchronously and stored for later reuse
(see
DocumentStorageOptionsDTO
increateDocument(CreateDocumentRequestDTO)
orprepareDocument(PrepareDocumentRequestDTO)
). Optionally, the document can also be archived. - Staged document instances: The staged document is, in addition to the previous option, assigned to a pre-configured document type and a reference object instance
(see
createDocumentInstance(CreateDocumentInstanceRequestDTO)
orprepareDocumentInstance(PrepareDocumentInstanceRequestDTO)
). The document instances can be printed if the AEB Cloud Printing Server is installed in the customer's network and the output settings for printing are configured in the engine (manual configuration via UI required).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
static final String
An error occurred during the delete print request operation.static final String
The response state if the creation of the document content(s) failedstatic final String
The response state if a requested document content has not been foundstatic final String
The response state if the asynchronous creation of requested content has not yet been completed yet.static final String
The response state if the requested document has been expired (e.g.static final String
The response state if the the creation of the document instance failed.static final String
The response state if the document is locked by a user or other process and cannot be processed.static final String
The response state if a requested document has not been found (document does not exist or is not visible to the user context)static final String
The response state if multiple document contents have been found when requesting a document content.static final String
The response state if the requested object is locked by a user or other process and cannot be processed.static final String
The response state if a requested object has not been found (object does not exist or is not visible to the user context).static final String
The response state if the resolved printer in the context is unavailable at the time of the print request.static final String
The response state if the document processing encountered problemsstatic final String
The response state if a requested document reference object has not been found (reference object does not exist or is not visible to the user context)static final String
The response state if everything is finestatic final String
The response state if the template was not found among the existing templatesstatic final String
The response state if the template was not tagged with the desired external tag.static final String
An error occurred during the update print request operation. -
Method Summary
Modifier and TypeMethodDescriptioncreateDocument
(CreateDocumentRequestDTO request) Creates a document from the referenced template and document data.Creates a document from the referenced document type and document data.Creates an externally managed document template.Creates a document type.deleteDocument
(DeleteDocumentRequestDTO request) Deletes the document with the requested documentId.Deletes the document instance for the given reference object and document type.Deletes the document reference object with the requested reference type and reference number.Deletes the document reference object type with the requested identCode.Deletes the document template with the given name if the template exists and if it is managed externally.Deletes the document type with the requested identCode.Removes print request from queue, deletes persistent record.getDocument
(GetDocumentRequestDTO request) Returns the requested document content if it is available for the user.Returns the document instance for the given reference object and document type.Returns the document instances for the given reference object (and optionally document type).Returns the requested document reference object if it is available for the user.Executes a search query on the document reference objects.Returns the requested document reference object type if it is available for the user.Executes a search query on the document reference object types.getDocumentTemplateInfos
(String processor) Returns a list of available templates for the specified processor.getDocumentType
(GetDocTypeRequestDTO request) Returns the requested document type if it is available for the user.getDocumentTypes
(GetDocTypesRequestDTO request) Executes a search query on the document types.Returns list of all print requests for the specified queue (default: active only).Returns the state of a print request identified by its unique ID (obtained byprintDocumentInstance(PrintDocumentInstanceRequestDTO)
.getProcessorInfo
(String processor) Returns an information on functions and/or features supported by the processor.String[]
Collects tags of all document processors that are supported in this service.Parses the referenced template data and returns the required information, as specified in the parse query parameters.prepareDocument
(PrepareDocumentRequestDTO request) Prepares a document asynchronously from the referenced template and document data.Prepares a document asynchronously from the referenced document type and document data.Creates a print request for the requested document.putDocument
(PutDocumentRequestDTO request) Uploads an external document which does not depend on templates of the document.
LikecreateDocument(CreateDocumentRequestDTO)
andprepareDocument(PrepareDocumentRequestDTO)
the uploaded document can be queried, deleted and fetched by calling the corresponding method with the received documentId
The document also has a date to which this document is at least stored in the document store.
Currently only PDF up to a maximum size of 10MB is supported.Uploads an external document which does not depend on templates of the document.
The document type and reference object are resolved in the context of the session client.LikeputDocumentInstance(PutDocumentInstanceRequestDTO)
but with less limitations to the uploaded contents.Create or update a document reference object.Create or update a document reference object type.default PutDocumentTemplateResponseDTO
Creates or replaces an externally managed document template.putDocumentTrusted
(PutDocumentRequestDTO request) LikeputDocument(PutDocumentRequestDTO)
but with less limitations to the uploaded contents.default PutDocTypeResponseDTO
putDocumentType
(PutDocTypeRequestDTO request) Creates or replaces a document type.queryDocuments
(QueryDocumentsRequestDTO request) Executes a search query on the documents stored in the document storage.Executes a search query on the documents stored in the document storage.Executes a search query on the documents stored in the document storage.Replaces the content of a document template.Updates a document type by replacing it.schemaToXsd
(SchemaToXsdRequestDTO request) Converts the given structuredDocumentTemplateSchemaDTO
schema and returns it as a XSD file.Updates print request state by requested operation.xsdToSchema
(XsdToSchemaRequestDTO request) Parses the given XSD schema file and returns it as a structuredDocumentTemplateSchemaDTO
.
-
Field Details
-
STATE_SUCCESS
The response state if everything is fine- See Also:
-
STATE_TEMPLATE_MISSING
The response state if the template was not found among the existing templates- See Also:
-
STATE_TEMPLATE_VERSION_MISMATCH
The response state if the template was not tagged with the desired external tag.- See Also:
-
STATE_PROCESSING_PROBLEMS
The response state if the document processing encountered problems- See Also:
-
STATE_DOCUMENT_NOT_FOUND
The response state if a requested document has not been found (document does not exist or is not visible to the user context)- See Also:
-
STATE_DOCUMENT_CONTENT_MISSING
The response state if a requested document content has not been found- See Also:
-
STATE_DOCUMENT_CONTENT_PENDING
The response state if the asynchronous creation of requested content has not yet been completed yet.- See Also:
-
STATE_DOCUMENT_CONTENT_CREATION_ERROR
The response state if the creation of the document content(s) failed- See Also:
-
STATE_DOCUMENT_INSTANCE_CREATION_ERROR
The response state if the the creation of the document instance failed. This typically happens if the document type was not found for the session client or the document type is not configured correctly.- See Also:
-
STATE_DOCUMENT_LOCKED
The response state if the document is locked by a user or other process and cannot be processed.- See Also:
-
STATE_OBJECT_NOT_FOUND
The response state if a requested object has not been found (object does not exist or is not visible to the user context).- See Also:
-
STATE_OBJECT_LOCKED
The response state if the requested object is locked by a user or other process and cannot be processed.- See Also:
-
STATE_MULTIPLE_DOCUMENT_CONTENTS_FOUND
The response state if multiple document contents have been found when requesting a document content. This might happen if no variant was defined in the request.- See Also:
-
STATE_REFERENCE_OBJECT_NOT_FOUND
The response state if a requested document reference object has not been found (reference object does not exist or is not visible to the user context)- See Also:
-
STATE_DOCUMENT_EXPIRED
The response state if the requested document has been expired (e.g. the duration of retention was exceeded). Contents have to be newly created.- See Also:
-
STATE_DELETE_PRINT_REQUEST_FAILED
An error occurred during the delete print request operation.- See Also:
-
STATE_UPDATE_PRINT_REQUEST_FAILED
An error occurred during the update print request operation.- See Also:
-
STATE_PRINTER_NOT_FOUND
The response state if the resolved printer in the context is unavailable at the time of the print request.- See Also:
-
PROCESSING_PARAM_CONTENT_VARIANT
- See Also:
-
-
Method Details
-
getSupportedProcessors
String[] getSupportedProcessors()Collects tags of all document processors that are supported in this service.- Returns:
- list of tags of the supported document processors
-
getProcessorInfo
Returns an information on functions and/or features supported by the processor.- Parameters:
processor
- required processor tag- Returns:
- processor information
- See Also:
-
getDocumentTemplateInfos
Returns a list of available templates for the specified processor. The templates are resolved in the context of the session client.- Parameters:
processor
- processor tag filter (optional; when empty ornull
, templates for all supported processors are returned)- Returns:
- list of
DocumentTemplateInfoDTO
s - See Also:
-
parseDocumentTemplateContent
ParseDocumentTemplateContentResponseDTO parseDocumentTemplateContent(ParseDocumentTemplateContentRequestDTO request) Parses the referenced template data and returns the required information, as specified in the parse query parameters. The supported query parameters are individual to each document processor.- Parameters:
request
- template reference and parse query parameters- Returns:
- parsed content, as requested by the query
-
createDocument
Creates a document from the referenced template and document data. The template is resolved in the context of the session client. If aStagedDocumentOptionsDTO
is defined the created document contents will be retained for later reuse.
An existing document can be updated by specifying theStagedDocumentOptionsDTO.documentId
and stored as a new revision in the archive if it was previously archived.
The update can be done in different ways @seeStagedDocumentOptionsDTO.documentId
.- Parameters:
request
- template reference, document data and processing options- Returns:
- created document, optionally with a list of processing traces/problems
-
createDocumentInstance
Creates a document from the referenced document type and document data. The document type and reference object are resolved in the context of the session client. The output format and archive options are defined in the referenced document type.
Created document are retained for later reuse, e.g. fetching or printing the document. The caller can fetch the document contents by calling the getDocument method with the received documentId or getDocumentInstance with the reference object and document type.
An existing document can be updated by specifying the reference object and stored as a new revision in the archive if it has to be or was previously archived.
.- Parameters:
request
- reference object and document type reference, document data and processing options- Returns:
- created document, optionally with a list of processing traces/problems
-
prepareDocument
Prepares a document asynchronously from the referenced template and document data. The template is resolved in the context of the session client. The caller can fetch the document contents by calling the getDocument method with the received documentId
An existing document can be updated by specifying theStagedDocumentOptionsDTO.documentId
and stored as a new revision in the archive if it was previously archived.
The update can be done in different ways @seeStagedDocumentOptionsDTO.documentId
.- Parameters:
request
- template reference, document reference, document data and processing options- Returns:
- document id with which the document contents can be retrieved by getDocument
-
prepareDocumentInstance
PrepareDocumentInstanceResponseDTO prepareDocumentInstance(PrepareDocumentInstanceRequestDTO request) Prepares a document asynchronously from the referenced document type and document data. The document type and reference object are resolved in the context of the session client. The output format and archive options are defined in the referenced document type.
Created document are retained for later reuse, e.g. fetching or printing the document. The caller can fetch the document contents by calling the getDocument method with the received documentId or getDocumentInstance with the reference object and document type.
An existing document can be updated by specifying the reference object and stored as a new revision in the archive if it has to be or was previously archived.
.- Parameters:
request
- reference object and document type reference, document data and processing options- Returns:
- document id with which the document contents can be retrieved by getDocument
-
queryDocuments
Executes a search query on the documents stored in the document storage. Only the documents that are visible to the caller (session user and session client) are returned. The results can be sorted by predefined criteria, the limit of the number of results is configurable, too.- Parameters:
request
- document by criteria (e.g. documentId, documentReference, createdTimestamp...)- Returns:
- found documents
-
queryDocumentsById
Executes a search query on the documents stored in the document storage. The search is optimized for a list ofdocumentId
s. Only the documents that are visible to the caller (session user and session client) are returned. The results can be sorted by predefined criteria, the limit of the number of results is configurable, too.- Parameters:
request
- documents by their documentIds- Returns:
- found documents
-
queryDocumentsByRef
Executes a search query on the documents stored in the document storage. The search is optimized for a list of document references (combination of areferenceType
, list ofreferenceNumber
s and list ofdocumentType
s). Only the documents that are visible to the caller (session user and session client) are returned. The results can be sorted by predefined criteria, the limit of the number of results is configurable, too.- Parameters:
request
- documents by their reference data (referenceType, referenceNumbers, documentTypes)- Returns:
- found documents
-
getDocument
Returns the requested document content if it is available for the user. A document may contain several contents, so the user has to define which content to return by the documentId and the variant.- Parameters:
request
- documentId and variant defining the content of the staged document- Returns:
- document content and infos about the document
-
deleteDocument
Deletes the document with the requested documentId.- Parameters:
request
- documentId of the document to delete- Returns:
- state of the delete request (SUCCESS or DOCUMENT_NOT_FOUND)
-
putDocument
Uploads an external document which does not depend on templates of the document.
LikecreateDocument(CreateDocumentRequestDTO)
andprepareDocument(PrepareDocumentRequestDTO)
the uploaded document can be queried, deleted and fetched by calling the corresponding method with the received documentId
The document also has a date to which this document is at least stored in the document store.
Currently only PDF up to a maximum size of 10MB is supported.- Parameters:
request
- document to upload and optional settings to store the document in an archive- Returns:
- state and document id with which the document can be retrieved by getDocument
-
putDocumentTrusted
LikeputDocument(PutDocumentRequestDTO)
but with less limitations to the uploaded contents. Access is restricted to the role "I_DOCUMENTSERVICEBF_TRUSTED".- See Also:
-
putDocumentInstance
Uploads an external document which does not depend on templates of the document.
The document type and reference object are resolved in the context of the session client. The archive options are defined in the referenced document type.
LikecreateDocumentInstance(CreateDocumentInstanceRequestDTO)
andprepareDocumentInstance(PrepareDocumentInstanceRequestDTO)
the uploaded document can be queried, deleted and fetched by calling the corresponding method with the received documentId
The document also has a date to which this document is at least stored in the document store.
Currently only PDF up to a maximum size of 10MB is supported.- Parameters:
request
- document to upload and optional meta keys in case of archiving- Returns:
- state and document id with which the document can be retrieved by getDocument
-
putDocumentInstanceTrusted
LikeputDocumentInstance(PutDocumentInstanceRequestDTO)
but with less limitations to the uploaded contents. Access is restricted to the role "I_DOCUMENTSERVICEBF_TRUSTED". -
getDocumentInstance
Returns the document instance for the given reference object and document type.- Parameters:
request
- reference to the reference object and document type.- Returns:
- document content and information about the document instance
-
getDocumentInstances
Returns the document instances for the given reference object (and optionally document type).- Parameters:
request
- reference to the reference object- Returns:
- document information about the document instances
-
deleteDocumentInstance
Deletes the document instance for the given reference object and document type.- Parameters:
request
- documentId of the document to delete- Returns:
- state of the delete request
-
printDocumentInstance
Creates a print request for the requested document. The document must have been created byprepareDocumentInstance(PrepareDocumentInstanceRequestDTO)
orcreateDocumentInstance(CreateDocumentInstanceRequestDTO)
and defined by its documentId.
The printing location depends on the session context (e.g. user/client or workstation) and the printing output settings in the document type of the document.
The print request is processed asynchronously and may fail if the cloud printing server service is not started on the target machine. When the print request is processed the actual content of the document will be printed, e.g if the document has been changed since the print request was created the changes will be printed.
- Parameters:
request
-- Returns:
-
createDocumentTemplate
Creates an externally managed document template. Fails if any document template with the given name exists.- Parameters:
request
- Content for the new document template.- Returns:
-
replaceDocumentTemplate
ReplaceDocumentTemplateResponseDTO replaceDocumentTemplate(ReplaceDocumentTemplateRequestDTO request) Replaces the content of a document template. Fails if no document template with the denoted name exists or if the document template is not managed externally.- Parameters:
request
- Content for the document template.- Returns:
-
putDocumentTemplate
Creates or replaces an externally managed document template. SeecreateDocumentTemplate(CreateDocumentTemplateRequestDTO)
andreplaceDocumentTemplate(ReplaceDocumentTemplateRequestDTO)
.- Parameters:
request
- Content for the document template.- Returns:
-
deleteDocumentTemplate
Deletes the document template with the given name if the template exists and if it is managed externally. Returns true, if template was deleted, false otherwise.- Parameters:
request
- Reference to the template.- Returns:
-
xsdToSchema
Parses the given XSD schema file and returns it as a structuredDocumentTemplateSchemaDTO
.- Parameters:
request
- XSD source.- Returns:
-
schemaToXsd
Converts the given structuredDocumentTemplateSchemaDTO
schema and returns it as a XSD file.- Parameters:
request
- Structured schema.- Returns:
-
getDocumentReferenceObjectTypes
GetDocumentReferenceObjectTypesResponseDTO getDocumentReferenceObjectTypes(GetDocumentReferenceObjectTypesRequestDTO request) Executes a search query on the document reference object types. Only the documents that are visible to the caller (session user and session client) are returned.- Parameters:
request
- document reference object types by criteria (e.g. only client dependent ones)- Returns:
- found document reference object types
-
getDocumentReferenceObjectType
GetDocumentReferenceObjectTypeResponseDTO getDocumentReferenceObjectType(GetDocumentReferenceObjectTypeRequestDTO request) Returns the requested document reference object type if it is available for the user.- Parameters:
request
- identCode defining the document reference object type- Returns:
- document reference object type
-
putDocumentReferenceObjectType
PutDocumentReferenceObjectTypeResponseDTO putDocumentReferenceObjectType(PutDocumentReferenceObjectTypeRequestDTO request) Create or update a document reference object type.- Parameters:
request
- identCode defining the document reference object type to create or update- Returns:
- state of the create or update request (SUCCESS or LOCKED)
-
deleteDocumentReferenceObjectType
DeleteDocumentReferenceObjectTypeResponseDTO deleteDocumentReferenceObjectType(DeleteDocumentReferenceObjectTypeRequestDTO request) Deletes the document reference object type with the requested identCode.- Parameters:
request
- identCode of the document reference object type to delete- Returns:
- state of the delete request (SUCCESS, LOCKED or NOT_FOUND)
-
getDocumentReferenceObjects
GetDocumentReferenceObjectsResponseDTO getDocumentReferenceObjects(GetDocumentReferenceObjectsRequestDTO request) Executes a search query on the document reference objects. Only the document reference objects that are visible to the caller (session user and session client) are returned. The results can be sorted by predefined criteria, the limit of the number of results is configurable, too.- Parameters:
request
- document reference object types by criteria (e.g. reference type)- Returns:
- found document reference objects
-
getDocumentReferenceObject
GetDocumentReferenceObjectResponseDTO getDocumentReferenceObject(GetDocumentReferenceObjectRequestDTO request) Returns the requested document reference object if it is available for the user.- Parameters:
request
- reference type and reference number of the document reference object- Returns:
- document reference object type
-
putDocumentReferenceObject
PutDocumentReferenceObjectResponseDTO putDocumentReferenceObject(PutDocumentReferenceObjectRequestDTO request) Create or update a document reference object.- Parameters:
request
- reference type and reference number of the document reference object- Returns:
- state of the create or update request (SUCCESS or LOCKED)
-
deleteDocumentReferenceObject
DeleteDocumentReferenceObjectResponseDTO deleteDocumentReferenceObject(DeleteDocumentReferenceObjectRequestDTO request) Deletes the document reference object with the requested reference type and reference number.- Parameters:
request
- reference type and reference number of the document reference object- Returns:
- state of the delete request (SUCCESS, LOCKED or NOT_FOUND)
-
getDocumentTypes
Executes a search query on the document types. Only the documents that are visible to the caller (session user and session client) are returned.- Parameters:
request
- document types by criteria- Returns:
- found document types
-
getDocumentType
Returns the requested document type if it is available for the user.- Parameters:
request
- identCode defining the document type- Returns:
- document type
-
createDocumentType
Creates a document type. An existing document template can be assigned by usingAbstractDocTypeRequestDTO.templateName
or a new externally managed document template can be created by defining the template usingCreateDocTypeRequestDTO.template
. Fails if the document template can not be created.- Parameters:
request
- document type to be created- Returns:
- state of the create request (SUCCESS or LOCKED)
-
replaceDocumentType
Updates a document type by replacing it. An existing document template can be assigned by usingAbstractDocTypeRequestDTO.templateName
or the assigned document template can be updated by usingReplaceDocTypeRequestDTO.template
. Fails if the document template can not be updated.- Parameters:
request
- document type to be replaced and its contents- Returns:
- state of the replace request (SUCCESS, LOCKED or NOT_FOUND)
-
putDocumentType
Creates or replaces a document type. SeecreateDocumentType(CreateDocTypeRequestDTO)
andreplaceDocumentType(ReplaceDocTypeRequestDTO)
.- Parameters:
request
- document type to be created or replaced- Returns:
- state of the create request (SUCCESS or LOCKED)
-
deleteDocumentType
Deletes the document type with the requested identCode.- Parameters:
request
- identCode of the document type to delete- Returns:
- state of the delete request (SUCCESS, LOCKED or NOT_FOUND)
-
getWorkstations
WorkstationDTO[] getWorkstations()- Returns:
- list of available
WorkstationDTO
-
getPrintRequestState
Returns the state of a print request identified by its unique ID (obtained byprintDocumentInstance(PrintDocumentInstanceRequestDTO)
.- Parameters:
request
- id of the print request and workstationId (optional)- Returns:
- print request information including state of the print request.
-
getPrintRequests
Returns list of all print requests for the specified queue (default: active only). The state of the queue may influence the individual request states.- Parameters:
request
- print queue filter (e.g. workstationId)- Returns:
- print requests' information including state of the print queue.
-
updatePrintRequest
Updates print request state by requested operation. If successful, returns also its latest state in response. (see alsogetPrintRequestState(GetPrintRequestStateRequestDTO)
.- Parameters:
request
- print request identifier with desired operation- Returns:
- latest information on print request state if successful
-
deletePrintRequest
Removes print request from queue, deletes persistent record.- Parameters:
request
- print request identifier- Returns:
- operation status (see
DeletePrintRequestResponseDTO.state
)
-