當前位置: 首頁>>代碼示例>>Java>>正文


Java DocumentSearchCriteriaEbo類代碼示例

本文整理匯總了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;
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:31,代碼來源:KewRemoteModuleService.java

示例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);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:42,代碼來源:KEWModuleService.java

示例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);
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:13,代碼來源:KewRemoteModuleService.java

示例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
           }
           
       };
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:51,代碼來源:KEWModuleService.java

示例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
        }

    };
}
 
開發者ID:kuali,項目名稱:kc-rice,代碼行數:51,代碼來源:KewRemoteModuleService.java


注:本文中的org.kuali.rice.kew.docsearch.DocumentSearchCriteriaEbo類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。