当前位置: 首页>>代码示例>>Java>>正文


Java KewApiServiceLocator.getDocumentAttributeIndexingQueue方法代码示例

本文整理汇总了Java中org.kuali.rice.kew.api.KewApiServiceLocator.getDocumentAttributeIndexingQueue方法的典型用法代码示例。如果您正苦于以下问题:Java KewApiServiceLocator.getDocumentAttributeIndexingQueue方法的具体用法?Java KewApiServiceLocator.getDocumentAttributeIndexingQueue怎么用?Java KewApiServiceLocator.getDocumentAttributeIndexingQueue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.kuali.rice.kew.api.KewApiServiceLocator的用法示例。


在下文中一共展示了KewApiServiceLocator.getDocumentAttributeIndexingQueue方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: saveRoutingData

import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
public DocumentRouteHeaderValue saveRoutingData(String principalId, DocumentRouteHeaderValue routeHeader) {
	KEWServiceLocator.getRouteHeaderService().saveRouteHeader(routeHeader);
	
	// save routing data should invoke the post processor doActionTaken for SAVE
	 	ActionTakenValue val = new ActionTakenValue();
	 	val.setActionTaken(KewApiConstants.ACTION_TAKEN_SAVED_CD);
	 	val.setDocumentId(routeHeader.getDocumentId());
       val.setPrincipalId(principalId);
	 	PostProcessor postProcessor = routeHeader.getDocumentType().getPostProcessor();
	 	try {
	 		postProcessor.doActionTaken(new org.kuali.rice.kew.framework.postprocessor.ActionTakenEvent(routeHeader.getDocumentId(), routeHeader.getAppDocId(), ActionTakenValue.to(val)));
	 	} catch (Exception e) {
	 		if (e instanceof RuntimeException) {
	 			throw (RuntimeException)e;
	 		}
	 		throw new WorkflowRuntimeException(e);
	 	}

	 	RouteContext routeContext = RouteContext.getCurrentRouteContext();
	 	if (routeHeader.getDocumentType().hasSearchableAttributes() && !routeContext.isSearchIndexingRequestedForContext()) {
	 		routeContext.requestSearchIndexingForContext();
           DocumentAttributeIndexingQueue queue = KewApiServiceLocator.getDocumentAttributeIndexingQueue(routeHeader.getDocumentType().getApplicationId());
           queue.indexDocument(routeHeader.getDocumentId());
	}
	return finish(routeHeader);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:27,代码来源:WorkflowDocumentServiceImpl.java

示例2: indexForSearchAfterActionIfNecessary

import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
/**
 * Does a search index after a non-post processing action completes
 * @param routeHeader the route header of the document just acted upon
 */
protected void indexForSearchAfterActionIfNecessary(DocumentRouteHeaderValue routeHeader) {
	RouteContext routeContext = RouteContext.getCurrentRouteContext();
	if (routeHeader.getDocumentType().hasSearchableAttributes() && routeContext.isSearchIndexingRequestedForContext()) {
           DocumentAttributeIndexingQueue queue = KewApiServiceLocator.getDocumentAttributeIndexingQueue(routeHeader.getDocumentType().getApplicationId());
           queue.indexDocument(routeHeader.getDocumentId());
	}
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:12,代码来源:WorkflowDocumentServiceImpl.java

示例3: updateSearchableAttributesIfPossible

import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
protected void updateSearchableAttributesIfPossible() {
	// queue the document up so that it can be indexed for searching if it
	// has searchable attributes
	RouteContext routeContext = RouteContext.getCurrentRouteContext();
	if (routeHeader.getDocumentType().hasSearchableAttributes() && !routeContext.isSearchIndexingRequestedForContext()) {
		routeContext.requestSearchIndexingForContext();
           DocumentAttributeIndexingQueue queue = KewApiServiceLocator.getDocumentAttributeIndexingQueue(routeHeader.getDocumentType().getApplicationId());
           queue.indexDocument(getDocumentId());
	}
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:11,代码来源:ActionTakenEvent.java

示例4: orchestrateDocument

import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
@Override
  public void orchestrateDocument(String documentId, String principalId, OrchestrationConfig orchestrationConfig,
          DocumentProcessingOptions documentProcessingOptions) {
      if (StringUtils.isBlank(principalId)) {
          throw new RiceIllegalArgumentException("principalId is null or blank");
      }

      if (StringUtils.isBlank(documentId)) {
          throw new RiceIllegalArgumentException("documentId is null");
      }

      if (orchestrationConfig == null) {
          throw new RiceIllegalArgumentException("orchestrationConfig is null");
      }
      if (documentProcessingOptions == null) {
          documentProcessingOptions = DocumentProcessingOptions.createDefault();
      }

      LOG.info("Performing document orchestration on documentId=" + documentId);
      KEWServiceLocator.getRouteHeaderService().lockRouteHeader(documentId);
      DocumentRouteHeaderValue document = KEWServiceLocator.getRouteHeaderService().getRouteHeader(documentId);
ActionTakenValue actionTaken = KEWServiceLocator.getActionTakenService().findByActionTakenId(orchestrationConfig.getActionTakenId());
Principal principal = KEWServiceLocator.getIdentityHelperService().getPrincipal(principalId);
BlanketApproveAction blanketApprove = new BlanketApproveAction(document, principal, "", orchestrationConfig.getNodeNames());
try {
	blanketApprove.performDeferredBlanketApproveWork(actionTaken, documentProcessingOptions);
} catch (Exception e) {
          if (e instanceof RuntimeException) {
              throw (RuntimeException)e;
          }
	throw new WorkflowRuntimeException(e);
}
if (documentProcessingOptions.isIndexSearchAttributes()) {
          DocumentAttributeIndexingQueue queue = KewApiServiceLocator.getDocumentAttributeIndexingQueue(document.getDocumentType().getApplicationId());
          queue.indexDocument(documentId);
}
      LOG.info("Document orchestration complete against documentId=" + documentId);
  }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:39,代码来源:DocumentOrchestrationQueueImpl.java

示例5: initiateIndexing

import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
@Override
public void initiateIndexing(String documentId) {
    incomingParamCheck(documentId, "documentId");
    DocumentRouteHeaderValue documentBo = KEWServiceLocator.getRouteHeaderService().getRouteHeader(documentId);
    if (documentBo.getDocumentType().hasSearchableAttributes()) {
        DocumentAttributeIndexingQueue queue = KewApiServiceLocator.getDocumentAttributeIndexingQueue(documentBo.getDocumentType().getApplicationId());
        queue.indexDocument(documentId);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:10,代码来源:WorkflowDocumentActionsServiceImpl.java

示例6: indexSearchableAttributes

import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
public ActionForward indexSearchableAttributes(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
	DocumentOperationForm docForm = (DocumentOperationForm) form;
       DocumentAttributeIndexingQueue queue = KewApiServiceLocator.getDocumentAttributeIndexingQueue(docForm.getRouteHeader().getDocumentType().getApplicationId());
       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");
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:10,代码来源:DocumentOperationAction.java


注:本文中的org.kuali.rice.kew.api.KewApiServiceLocator.getDocumentAttributeIndexingQueue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。