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


Java KRADServiceLocatorWeb.getDocumentService方法代码示例

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


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

示例1: testMultiSelectIntegration

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
/**
   * Test multiple value searches in the context of whole document search context
   */
  @Test
  public void testMultiSelectIntegration() throws Exception {
  	final DocumentService docService = KRADServiceLocatorWeb.getDocumentService();
//docSearchService = KEWServiceLocator.getDocumentSearchService();
DocumentType docType = KEWServiceLocator.getDocumentTypeService().findByName("AccountWithDDAttributes");
      String principalName = "quickstart";
      String principalId = KimApiServiceLocator.getPersonService().getPersonByPrincipalName(principalName).getPrincipalId();

      // Route some test documents.
docService.routeDocument(DOCUMENT_FIXTURE.NORMAL_DOCUMENT.getDocument(docService), "Routing NORMAL_DOCUMENT", null);

assertDDSearchableAttributeWildcardsWork(docType, principalId, "accountStateMultiselect",
		new String[][] {{"FirstState"}, {"SecondState"}, {"ThirdState"}, {"FourthState"}, {"FirstState", "SecondState"}, {"FirstState","ThirdState"}, {"FirstState", "FourthState"}, {"SecondState", "ThirdState"}, {"SecondState", "FourthState"}, {"ThirdState", "FourthState"}, {"FirstState", "SecondState", "ThirdState"}, {"FirstState", "ThirdState", "FourthState"}, {"SecondState", "ThirdState", "FourthState"}, {"FirstState","SecondState", "ThirdState", "FourthState"}},
		new int[] { 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1 });

assertDDSearchableAttributeWildcardsWork(docType, principalId, "accountOpenDate",
		new String[][] {{"10/15/2009"}, {"10/15/2009","10/17/2009"}, {"10/14/2009","10/16/2009"}},
		new int[] { 1, 1, 0 });

assertDDSearchableAttributeWildcardsWork(docType, principalId, "accountBalance",
		new String[][] {{"501.77"},{"501.77", "63.54"},{"501.78","501.74"}, {"502.00"}, {"0.00"} },
		new int[] { 1, 1, 0, 0, 0 });

assertDDSearchableAttributeWildcardsWork(docType, principalId, "accountNumber",
		new String[][] {{"1234567890"},{"1234567890", "9876543210"},{"9876543210","77774"}, {"88881"}, {"0"} },
		new int[] { 1, 1, 0, 0, 0 });
  }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:31,代码来源:DataDictionarySearchableAttributeTest.java

示例2: getDocumentService

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
protected DocumentService getDocumentService() {
    if (documentService == null) {
        documentService = KRADServiceLocatorWeb.getDocumentService();
    }
    return documentService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:MaintenanceDocumentBase.java

示例3: getDocumentService

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
protected DocumentService getDocumentService() {
    if (this.documentService == null) {
        this.documentService = KRADServiceLocatorWeb.getDocumentService();
    }
    return this.documentService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:DocumentControllerServiceImpl.java

示例4: getDocumentService

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
protected DocumentService getDocumentService() {
       if (documentService == null) {
           this.documentService = KRADServiceLocatorWeb.getDocumentService();
       }
	return this.documentService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:MaintenanceViewTypeServiceImpl.java

示例5: getDocumentService

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
protected DocumentService getDocumentService() {
    if (documentService == null) {
        documentService = KRADServiceLocatorWeb.getDocumentService();
    }
    return this.documentService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:KualiDocumentActionBase.java

示例6: extractDocumentAttributes

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
@Override
public List<DocumentAttribute> extractDocumentAttributes(ExtensionDefinition extensionDefinition,
        DocumentWithContent documentWithContent) {
    List<DocumentAttribute> attributes = new ArrayList<DocumentAttribute>();

    String docId = documentWithContent.getDocument().getDocumentId();

    DocumentService docService = KRADServiceLocatorWeb.getDocumentService();
    Document doc = null;
    try  {
        doc = docService.getByDocumentHeaderIdSessionless(docId);
    } catch (WorkflowException we) {
    	LOG.error( "Unable to retrieve document " + docId + " in getSearchStorageValues()", we);
    }

    String attributeValue = "";
    if ( doc != null ) {
    	if ( doc.getDocumentHeader() != null ) {
            attributeValue = doc.getDocumentHeader().getDocumentDescription();
    	} else {
    		attributeValue = "null document header";
    	}
    } else {
		attributeValue = "null document";
    }
    DocumentAttributeString attribute = DocumentAttributeFactory.createStringAttribute("documentDescription", attributeValue);
    attributes.add(attribute);

    attributeValue = "";
    if ( doc != null ) {
    	if ( doc.getDocumentHeader() != null ) {
            attributeValue = doc.getDocumentHeader().getOrganizationDocumentNumber();
    	} else {
    		attributeValue = "null document header";
    	}
    } else {
		attributeValue = "null document";
    }
    attribute = DocumentAttributeFactory.createStringAttribute("organizationDocumentNumber", attributeValue);
    attributes.add(attribute);

    if ( doc != null && doc instanceof MaintenanceDocument) {
        final Class<? extends BusinessObject> businessObjectClass = getBusinessObjectClass(
                documentWithContent.getDocument().getDocumentTypeName());
        if (businessObjectClass != null) {
            if (GlobalBusinessObject.class.isAssignableFrom(businessObjectClass)) {
                final GlobalBusinessObject globalBO = retrieveGlobalBusinessObject(docId, businessObjectClass);

                if (globalBO != null) {
                    attributes.addAll(findAllDocumentAttributesForGlobalBusinessObject(globalBO));
                }
            } else {
                attributes.addAll(parsePrimaryKeyValuesFromDocument(businessObjectClass, (MaintenanceDocument)doc));
            }

        }
    }
    if ( doc != null ) {
        DocumentEntry docEntry = KRADServiceLocatorWeb.getDataDictionaryService().getDataDictionary().getDocumentEntry(
                documentWithContent.getDocument().getDocumentTypeName());
        if ( docEntry != null ) {
      WorkflowAttributes workflowAttributes = docEntry.getWorkflowAttributes();
      WorkflowAttributePropertyResolutionService waprs = KNSServiceLocator
                    .getWorkflowAttributePropertyResolutionService();
      attributes.addAll(waprs.resolveSearchableAttributeValues(doc, workflowAttributes));
        } else {
        	LOG.error("Unable to find DD document entry for document type: " + documentWithContent.getDocument()
                    .getDocumentTypeName());
        }
    }
    return attributes;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:73,代码来源:DataDictionarySearchableAttribute.java

示例7: getDocumentService

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
public DocumentService getDocumentService() {
	if ( documentService == null ) {
		documentService = KRADServiceLocatorWeb.getDocumentService();
	}
	return documentService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:QualifierResolverBase.java

示例8: getDocumentService

import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
/**
* Returns the document service.
*
* <p>
* Gets the document service.
* </p>
*
* @return DocumentService - document service
*/
protected DocumentService getDocumentService() {

    if (documentService == null) {
        this.documentService = KRADServiceLocatorWeb.getDocumentService();
    }

    return this.documentService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:TransactionalViewTypeServiceImpl.java


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