Interface IDocumentServiceBF

All Known Subinterfaces:
IDocumentServiceExtBF

@BusinessFacade(extraPackages="de.aeb.xnsg.documentcore.bf") @MTOM @StreamingAttachment(parseEagerly=true, memoryThreshold=1048576L) public interface IDocumentServiceBF
External interface for document processing.

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:

  • Field Details

    • STATE_SUCCESS

      static final String STATE_SUCCESS
      The response state if everything is fine
      See Also:
    • STATE_TEMPLATE_MISSING

      static final String STATE_TEMPLATE_MISSING
      The response state if the template was not found among the existing templates
      See Also:
    • STATE_TEMPLATE_VERSION_MISMATCH

      static final String STATE_TEMPLATE_VERSION_MISMATCH
      The response state if the template was not tagged with the desired external tag.
      See Also:
    • STATE_PROCESSING_PROBLEMS

      static final String STATE_PROCESSING_PROBLEMS
      The response state if the document processing encountered problems
      See Also:
    • STATE_DOCUMENT_NOT_FOUND

      static final String 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

      static final String STATE_DOCUMENT_CONTENT_MISSING
      The response state if a requested document content has not been found
      See Also:
    • STATE_DOCUMENT_CONTENT_PENDING

      static final String 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

      static final String STATE_DOCUMENT_CONTENT_CREATION_ERROR
      The response state if the creation of the document content(s) failed
      See Also:
    • STATE_DOCUMENT_INSTANCE_CREATION_ERROR

      static final String 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

      static final String 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

      static final String 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

      static final String 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

      static final String 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

      static final String 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

      static final String 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

      static final String STATE_DELETE_PRINT_REQUEST_FAILED
      An error occurred during the delete print request operation.
      See Also:
    • STATE_UPDATE_PRINT_REQUEST_FAILED

      static final String STATE_UPDATE_PRINT_REQUEST_FAILED
      An error occurred during the update print request operation.
      See Also:
    • STATE_PRINTER_NOT_FOUND

      static final String 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

      static final String 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

      DocumentProcessorInfoDTO getProcessorInfo(String processor)
      Returns an information on functions and/or features supported by the processor.
      Parameters:
      processor - required processor tag
      Returns:
      processor information
      See Also:
    • getDocumentTemplateInfos

      DocumentTemplateInfoDTO[] getDocumentTemplateInfos(String processor)
      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 or null, templates for all supported processors are returned)
      Returns:
      list of DocumentTemplateInfoDTOs
      See Also:
    • parseDocumentTemplateContent

      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 a StagedDocumentOptionsDTO is defined the created document contents will be retained for later reuse.
      An existing document can be updated by specifying the StagedDocumentOptionsDTO.documentId and stored as a new revision in the archive if it was previously archived.
      The update can be done in different ways @see StagedDocumentOptionsDTO.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 the StagedDocumentOptionsDTO.documentId and stored as a new revision in the archive if it was previously archived.
      The update can be done in different ways @see StagedDocumentOptionsDTO.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

      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 of documentIds. 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 a referenceType, list of referenceNumbers and list of documentTypes). 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.
      Like createDocument(CreateDocumentRequestDTO) and prepareDocument(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

      PutDocumentResponseDTO putDocumentTrusted(PutDocumentRequestDTO request)
      Like putDocument(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.
      Like createDocumentInstance(CreateDocumentInstanceRequestDTO) and prepareDocumentInstance(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

      Like putDocumentInstance(PutDocumentInstanceRequestDTO) but with less limitations to the uploaded contents. Access is restricted to the role "I_DOCUMENTSERVICEBF_TRUSTED".
      See Also:
    • 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 by prepareDocumentInstance(PrepareDocumentInstanceRequestDTO) or createDocumentInstance(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

      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

      default PutDocumentTemplateResponseDTO putDocumentTemplate(PutDocumentTemplateRequestDTO request)
      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 structured DocumentTemplateSchemaDTO.
      Parameters:
      request - XSD source.
      Returns:
    • schemaToXsd

      Converts the given structured DocumentTemplateSchemaDTO schema and returns it as a XSD file.
      Parameters:
      request - Structured schema.
      Returns:
    • getDocumentReferenceObjectTypes

      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

      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

      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

      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

      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

      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

      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

      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

      GetDocTypesResponseDTO getDocumentTypes(GetDocTypesRequestDTO request)
      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

      GetDocTypeResponseDTO getDocumentType(GetDocTypeRequestDTO request)
      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 using AbstractDocTypeRequestDTO.templateName or a new externally managed document template can be created by defining the template using CreateDocTypeRequestDTO.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 using AbstractDocTypeRequestDTO.templateName or the assigned document template can be updated by using ReplaceDocTypeRequestDTO.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

      default PutDocTypeResponseDTO putDocumentType(PutDocTypeRequestDTO request)
      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 by printDocumentInstance(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 also getPrintRequestState(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)