Search in sources :

Example 1 with DocumentAttributeIndexingQueue

use of org.kuali.kfs.kew.api.document.attribute.DocumentAttributeIndexingQueue in project cu-kfs by CU-CommunityApps.

the class DocumentOperationAction method indexSearchableAttributes.

public ActionForward indexSearchableAttributes(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
    DocumentOperationForm docForm = (DocumentOperationForm) form;
    DocumentAttributeIndexingQueue queue = KewApiServiceLocator.getDocumentAttributeIndexingQueue();
    queue.indexDocument(docForm.getRouteHeader().getDocumentId());
    ActionMessages messages = new ActionMessages();
    messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("general.message", "Searchable Attribute Indexing was successfully scheduled"));
    saveMessages(request, messages);
    return mapping.findForward("basic");
}
Also used : ActionMessages(org.apache.struts.action.ActionMessages) ActionMessage(org.apache.struts.action.ActionMessage) DocumentAttributeIndexingQueue(org.kuali.kfs.kew.api.document.attribute.DocumentAttributeIndexingQueue)

Example 2 with DocumentAttributeIndexingQueue

use of org.kuali.kfs.kew.api.document.attribute.DocumentAttributeIndexingQueue in project cu-kfs by CU-CommunityApps.

the class CuPurchaseOrderAction method reIndexDocument.

/**
 * This method is being added to handle calls to force re-indexing of documents following change events performed on the documents.
 * This is necessary to correct problems with searches not returning accurate results due to changes being made to documents,
 * but those changes not be indexed.
 *
 * @param document - The document to be re-indexed.
 */
private void reIndexDocument(PurchaseOrderDocument document) {
    final DocumentAttributeIndexingQueue documentAttributeIndexingQueue = KewApiServiceLocator.getDocumentAttributeIndexingQueue();
    documentAttributeIndexingQueue.indexDocument(document.getDocumentNumber());
}
Also used : DocumentAttributeIndexingQueue(org.kuali.kfs.kew.api.document.attribute.DocumentAttributeIndexingQueue)

Example 3 with DocumentAttributeIndexingQueue

use of org.kuali.kfs.kew.api.document.attribute.DocumentAttributeIndexingQueue in project cu-kfs by CU-CommunityApps.

the class CuPaymentRequestServiceImpl method reIndexDocument.

/**
 * KFSUPGRADE-508 : this is happened in multi-node env. also see KFSUPGRADE_347
 * This method is being added to handle calls to perform re-indexing of documents following change events performed on the documents.  This is necessary to correct problems
 * with searches not returning accurate results due to changes being made to documents, but those changes not be indexed.
 *
 * @param document - The document to be re-indexed.
 */
private void reIndexDocument(AccountsPayableDocument document) {
    // force reindexing
    final DocumentAttributeIndexingQueue documentAttributeIndexingQueue = KewApiServiceLocator.getDocumentAttributeIndexingQueue();
    documentAttributeIndexingQueue.indexDocument(document.getDocumentNumber());
}
Also used : DocumentAttributeIndexingQueue(org.kuali.kfs.kew.api.document.attribute.DocumentAttributeIndexingQueue)

Example 4 with DocumentAttributeIndexingQueue

use of org.kuali.kfs.kew.api.document.attribute.DocumentAttributeIndexingQueue in project cu-kfs by CU-CommunityApps.

the class CuCreditMemoServiceImpl method reIndexDocument.

/**
 * KFSUPGRADE-508 : this is happened in multi-node env. also see KFSUPGRADE_347
 * This method is being added to handle calls to perform re-indexing of documents following change events performed on the documents.  This is necessary to correct problems
 * with searches not returning accurate results due to changes being made to documents, but those changes not be indexed.
 *
 * @param document - The document to be re-indexed.
 */
private void reIndexDocument(AccountsPayableDocument document) {
    // force reindexing
    final DocumentAttributeIndexingQueue documentAttributeIndexingQueue = KewApiServiceLocator.getDocumentAttributeIndexingQueue();
    documentAttributeIndexingQueue.indexDocument(document.getDocumentNumber());
}
Also used : DocumentAttributeIndexingQueue(org.kuali.kfs.kew.api.document.attribute.DocumentAttributeIndexingQueue)

Example 5 with DocumentAttributeIndexingQueue

use of org.kuali.kfs.kew.api.document.attribute.DocumentAttributeIndexingQueue in project cu-kfs by CU-CommunityApps.

the class CuPdpExtractServiceImpl method updatePaymentRequest.

@Override
protected void updatePaymentRequest(PaymentRequestDocument paymentRequestDocument, Person puser, Date processRunDate) {
    try {
        PaymentRequestDocument doc = (PaymentRequestDocument) documentService.getByDocumentHeaderId(paymentRequestDocument.getDocumentNumber());
        doc.setExtractedTimestamp(new Timestamp(processRunDate.getTime()));
        getPurapService().saveDocumentNoValidation(doc);
        DocumentType documentType = documentTypeService.getDocumentTypeByName(doc.getFinancialDocumentTypeCode());
        DocumentAttributeIndexingQueue queue = KewApiServiceLocator.getDocumentAttributeIndexingQueue();
        queue.indexDocument(doc.getDocumentNumber());
    } catch (WorkflowException e) {
        throw new IllegalArgumentException("Unable to retrieve payment request: " + paymentRequestDocument.getDocumentNumber());
    }
}
Also used : WorkflowException(org.kuali.kfs.kew.api.exception.WorkflowException) DocumentType(org.kuali.kfs.kew.doctype.bo.DocumentType) DocumentAttributeIndexingQueue(org.kuali.kfs.kew.api.document.attribute.DocumentAttributeIndexingQueue) PaymentRequestDocument(org.kuali.kfs.module.purap.document.PaymentRequestDocument) Timestamp(java.sql.Timestamp)

Aggregations

DocumentAttributeIndexingQueue (org.kuali.kfs.kew.api.document.attribute.DocumentAttributeIndexingQueue)5 Timestamp (java.sql.Timestamp)1 ActionMessage (org.apache.struts.action.ActionMessage)1 ActionMessages (org.apache.struts.action.ActionMessages)1 WorkflowException (org.kuali.kfs.kew.api.exception.WorkflowException)1 DocumentType (org.kuali.kfs.kew.doctype.bo.DocumentType)1 PaymentRequestDocument (org.kuali.kfs.module.purap.document.PaymentRequestDocument)1