本文整理汇总了Java中org.kuali.rice.kew.docsearch.DocumentSearchCriteriaEbo类的典型用法代码示例。如果您正苦于以下问题:Java DocumentSearchCriteriaEbo类的具体用法?Java DocumentSearchCriteriaEbo怎么用?Java DocumentSearchCriteriaEbo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DocumentSearchCriteriaEbo类属于org.kuali.rice.kew.docsearch包,在下文中一共展示了DocumentSearchCriteriaEbo类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getExternalizableBusinessObject
import org.kuali.rice.kew.docsearch.DocumentSearchCriteriaEbo; //导入依赖的package包/类
/**
* This overridden method calls the DocumentTypeService instead of the underlying
* KNS service. Allows you to search on name and docTypeId
*
* @see org.kuali.rice.krad.service.impl.ModuleServiceBase#getExternalizableBusinessObject(java.lang.Class, java.util.Map)
*/
@Override
public <T extends ExternalizableBusinessObject> T getExternalizableBusinessObject(
Class<T> businessObjectClass, Map<String, Object> fieldValues) {
if(DocumentTypeEBO.class.isAssignableFrom(businessObjectClass)){
if ( fieldValues.containsKey( "name" ) ) {
return (T) DocumentType.from(getDocumentTypeService().getDocumentTypeByName((String) fieldValues.get(
"name")));
} else if( fieldValues.containsKey( "documentTypeId" ) ){
return (T) DocumentType.from(getDocumentTypeService().getDocumentTypeById(fieldValues.get("documentTypeId").toString()));
} else if (fieldValues.containsKey( "id" ) ) {
// assume it's a string and convert it to a long.
return (T) DocumentType.from(getDocumentTypeService().getDocumentTypeById(fieldValues.get("id").toString()));
}
} else if(DocumentSearchCriteriaEbo.class.isAssignableFrom( businessObjectClass )) {
if ( fieldValues.containsKey( "documentId" ) ) {
return (T)createDocumentSearchEbo(KewApiServiceLocator.getWorkflowDocumentService().getDocument(
fieldValues.get("documentId").toString()));
}
}
return null;
}
示例2: getExternalizableBusinessObject
import org.kuali.rice.kew.docsearch.DocumentSearchCriteriaEbo; //导入依赖的package包/类
/**
* This overridden method calls the DocumentTypeService instead of the underlying
* KNS service. Allows you to search on name and docTypeId
*
* @see org.kuali.rice.krad.service.impl.ModuleServiceBase#getExternalizableBusinessObject(java.lang.Class, java.util.Map)
*/
@Override
public <T extends ExternalizableBusinessObject> T getExternalizableBusinessObject(
Class<T> businessObjectClass, Map<String, Object> fieldValues) {
if(DocumentTypeEBO.class.isAssignableFrom(businessObjectClass)){
org.kuali.rice.kew.api.doctype.DocumentType fetchedDocumentType = null;
if ( fieldValues.containsKey( "name" ) ) {
fetchedDocumentType = getDocumentTypeService().getDocumentTypeByName((String) fieldValues.get("name"));
}else if( fieldValues.containsKey( "documentTypeId" ) ){
fetchedDocumentType = getDocumentTypeService().getDocumentTypeById(fieldValues.get("documentTypeId").toString());
}else if (fieldValues.containsKey( "id" ) ) {
// assume it's a string and convert it to a long.
fetchedDocumentType = getDocumentTypeService().getDocumentTypeById(fieldValues.get("id").toString());
}
if (fetchedDocumentType != null) {
// convert to EBO
return (T) DocumentType.from(fetchedDocumentType);
} else {
return null;
}
}else if(DocumentSearchCriteriaEbo.class.isAssignableFrom( businessObjectClass )){
if ( fieldValues.containsKey( "documentId" ) ) {
return (T)createDocumentSearchEbo(KewApiServiceLocator.getWorkflowDocumentService().getDocument(
fieldValues.get("documentId").toString()));
}
}
// otherwise, use the default implementation
return super.getExternalizableBusinessObject(businessObjectClass, fieldValues);
}
示例3: isExternalizable
import org.kuali.rice.kew.docsearch.DocumentSearchCriteriaEbo; //导入依赖的package包/类
@Override
public boolean isExternalizable(Class boClazz) {
if (boClazz == null) {
return false;
}
if(DocumentTypeEBO.class.isAssignableFrom(boClazz)) {
return true;
} else if(DocumentSearchCriteriaEbo.class.isAssignableFrom(boClazz)) {
return true;
}
return ExternalizableBusinessObject.class.isAssignableFrom(boClazz);
}
示例4: createDocumentSearchEbo
import org.kuali.rice.kew.docsearch.DocumentSearchCriteriaEbo; //导入依赖的package包/类
private DocumentSearchCriteriaEbo createDocumentSearchEbo(final Document doc){
return new DocumentSearchCriteriaEbo(){
@Override
public String getApplicationDocumentId() {
return doc.getApplicationDocumentId();
}
@Override
public DocumentStatus getStatus() {
return doc.getStatus();
}
@Override
public String getApplicationDocumentStatus() {
return doc.getApplicationDocumentStatus();
}
@Override
public String getTitle() {
return doc.getTitle();
}
@Override
public String getDocumentTypeName() {
return doc.getDocumentTypeName();
}
@Override
public String getInitiatorPrincipalId() {
return doc.getInitiatorPrincipalId();
}
@Override
public String getDocumentId() {
return doc.getDocumentId();
}
@Override
public DateTime getDateCreated() {
return doc.getDateCreated();
}
@Override
public void refresh() {
// do nothing
}
};
}
示例5: createDocumentSearchEbo
import org.kuali.rice.kew.docsearch.DocumentSearchCriteriaEbo; //导入依赖的package包/类
private DocumentSearchCriteriaEbo createDocumentSearchEbo(final Document doc){
return new DocumentSearchCriteriaEbo(){
@Override
public String getApplicationDocumentId() {
return doc.getApplicationDocumentId();
}
@Override
public DocumentStatus getStatus() {
return doc.getStatus();
}
@Override
public String getApplicationDocumentStatus() {
return doc.getApplicationDocumentStatus();
}
@Override
public String getTitle() {
return doc.getTitle();
}
@Override
public String getDocumentTypeName() {
return doc.getDocumentTypeName();
}
@Override
public String getInitiatorPrincipalId() {
return doc.getInitiatorPrincipalId();
}
@Override
public String getDocumentId() {
return doc.getDocumentId();
}
@Override
public DateTime getDateCreated() {
return doc.getDateCreated();
}
@Override
public void refresh() {
// do nothing
}
};
}