本文整理汇总了Java中org.kuali.rice.kew.api.KewApiServiceLocator.getDocumentTypeService方法的典型用法代码示例。如果您正苦于以下问题:Java KewApiServiceLocator.getDocumentTypeService方法的具体用法?Java KewApiServiceLocator.getDocumentTypeService怎么用?Java KewApiServiceLocator.getDocumentTypeService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kew.api.KewApiServiceLocator
的用法示例。
在下文中一共展示了KewApiServiceLocator.getDocumentTypeService方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getDocumentTypeService
import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
/**
* @return the docTypeService
*/
protected synchronized DocumentTypeService getDocumentTypeService() {
if(this.docTypeService == null){
// the default
this.docTypeService = KewApiServiceLocator.getDocumentTypeService();
}
return this.docTypeService;
}
示例2: getDocumentTypeService
import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
/**
* @return the docTypeService
*/
protected synchronized DocumentTypeService getDocumentTypeService() {
if(this.docTypeService == null){
// the default
this.docTypeService = KewApiServiceLocator.getDocumentTypeService();
}
return this.docTypeService;
}
示例3: getRulesByTemplateNameAndDocumentTypeNameAndEffectiveDate
import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
@Override
public List<Rule> getRulesByTemplateNameAndDocumentTypeNameAndEffectiveDate(String templateName, String documentTypeName,
DateTime effectiveDate)
throws RiceIllegalArgumentException {
QueryByCriteria.Builder query = QueryByCriteria.Builder.create();
List<Predicate> predicates = new ArrayList<Predicate>();
predicates.add(equal("ruleTemplate.name", templateName));
// Check all document types in ancestry
DocumentTypeService documentTypeService = KewApiServiceLocator.getDocumentTypeService();
org.kuali.rice.kew.api.doctype.DocumentType dt = documentTypeService.getDocumentTypeByName(documentTypeName);
List<String> documentTypeAncestryNames = new ArrayList<String>();
while (dt != null) {
documentTypeAncestryNames.add(dt.getName());
dt = dt.getParentId() == null ? null : documentTypeService.getDocumentTypeById(dt.getParentId());
}
predicates.add(in("docTypeName", documentTypeAncestryNames.toArray(
new String[documentTypeAncestryNames.size()])));
DateTime currentTime = new DateTime();
predicates.add(and(
or(isNull("fromDateValue"), lessThanOrEqual("fromDateValue", currentTime)),
or(isNull("toDateValue"), greaterThan("toDateValue", currentTime))
));
predicates.add(equal("active", Boolean.TRUE));
predicates.add(equal("delegateRule", Boolean.FALSE));
predicates.add(equal("templateRuleInd", Boolean.FALSE));
if (effectiveDate != null) {
predicates.add(
and(
or(isNull("activationDate"), lessThanOrEqual("activationDate", effectiveDate)),
or(isNull("deactivationDate"), greaterThan("deactivationDate", effectiveDate))
));
} else {
predicates.add(equal("currentInd", Boolean.TRUE));
}
Predicate p = and(predicates.toArray(new Predicate[]{}));
query.setPredicates(p);
return KewApiServiceLocator.getRuleService().findRules(query.build()).getResults();
}
示例4: getApiDocumentTypeService
import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
protected org.kuali.rice.kew.api.doctype.DocumentTypeService getApiDocumentTypeService() {
if (apiDocumentTypeService == null) {
apiDocumentTypeService = KewApiServiceLocator.getDocumentTypeService();
}
return apiDocumentTypeService;
}
示例5: testChangingDocumentTypeOnEnrouteDocument
import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
/**
* Verify that enroute documents are not affected if you edit their document type.
* @throws Exception
*/
@Test public void testChangingDocumentTypeOnEnrouteDocument() throws Exception {
WorkflowDocument document = WorkflowDocumentFactory.createDocument(getPrincipalIdForName("user1"), "DocumentType");
document.setTitle("");
document.route("");
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), document.getDocumentId());
assertTrue("rkirkend should have an approve request", document.isApprovalRequested());
org.kuali.rice.kew.api.doctype.DocumentTypeService docTypeService = KewApiServiceLocator.getDocumentTypeService();
Integer version1 = docTypeService.getDocumentTypeByName(document.getDocumentTypeName()).getDocumentTypeVersion();
//update the document type
loadXmlFile("DoctypeSecondVersion.xml");
//verify that we have a new documenttypeid and its a newer version
Integer version2 = docTypeService.getDocumentTypeByName(document.getDocumentTypeName()).getDocumentTypeVersion();
assertTrue("Version2 should be larger than verison1", version2.intValue() > version1.intValue());
//the new version would take the document final
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("rkirkend"), document.getDocumentId());
assertTrue("rkirkend should have an approve request", document.isApprovalRequested());
document.approve("");
document = WorkflowDocumentFactory.loadDocument(getPrincipalIdForName("user2"), document.getDocumentId());
Integer versionDocument = docTypeService.getDocumentTypeById(document.getDocument().getDocumentTypeId()).getDocumentTypeVersion();
assertTrue("user2 should have an approve request", document.isApprovalRequested());
//make sure our document still represents the accurate version
assertEquals("Document has the wrong document type version", version1, versionDocument);
}
示例6: getDocumentTypeService
import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
protected DocumentTypeService getDocumentTypeService() {
if ( documentTypeService == null ) {
documentTypeService = KewApiServiceLocator.getDocumentTypeService();
}
return this.documentTypeService;
}
示例7: getDocumentTypeService
import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
public DocumentTypeService getDocumentTypeService() {
if (documentTypeService == null) {
documentTypeService = KewApiServiceLocator.getDocumentTypeService();
}
return documentTypeService;
}
示例8: getDocumentTypeService
import org.kuali.rice.kew.api.KewApiServiceLocator; //导入方法依赖的package包/类
public DocumentTypeService getDocumentTypeService() {
if (documentTypeService == null) {
documentTypeService = KewApiServiceLocator.getDocumentTypeService();
}
return this.documentTypeService;
}