本文整理汇总了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 });
}
示例2: getDocumentService
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
protected DocumentService getDocumentService() {
if (documentService == null) {
documentService = KRADServiceLocatorWeb.getDocumentService();
}
return documentService;
}
示例3: getDocumentService
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
protected DocumentService getDocumentService() {
if (this.documentService == null) {
this.documentService = KRADServiceLocatorWeb.getDocumentService();
}
return this.documentService;
}
示例4: getDocumentService
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
protected DocumentService getDocumentService() {
if (documentService == null) {
this.documentService = KRADServiceLocatorWeb.getDocumentService();
}
return this.documentService;
}
示例5: getDocumentService
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
protected DocumentService getDocumentService() {
if (documentService == null) {
documentService = KRADServiceLocatorWeb.getDocumentService();
}
return this.documentService;
}
示例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;
}
示例7: getDocumentService
import org.kuali.rice.krad.service.KRADServiceLocatorWeb; //导入方法依赖的package包/类
public DocumentService getDocumentService() {
if ( documentService == null ) {
documentService = KRADServiceLocatorWeb.getDocumentService();
}
return documentService;
}
示例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;
}