本文整理匯總了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
}
};
}