• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java DocumentSearchResultValues类的典型用法和代码示例

java 2次浏览

本文整理汇总了Java中org.kuali.rice.kew.framework.document.search.DocumentSearchResultValues的典型用法代码示例。如果您正苦于以下问题:Java DocumentSearchResultValues类的具体用法?Java DocumentSearchResultValues怎么用?Java DocumentSearchResultValues使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

DocumentSearchResultValues类属于org.kuali.rice.kew.framework.document.search包,在下文中一共展示了DocumentSearchResultValues类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: customizeResults

点赞 3

import org.kuali.rice.kew.framework.document.search.DocumentSearchResultValues; //导入依赖的package包/类
@Override
public DocumentSearchResultValues customizeResults(DocumentSearchCriteria documentSearchCriteria,
        List<DocumentSearchResult> defaultResults,
        String customizerName) throws RiceIllegalArgumentException {
    if (documentSearchCriteria == null) {
        throw new RiceIllegalArgumentException("documentSearchCriteria was null");
    }
    if (defaultResults == null) {
        throw new RiceIllegalArgumentException("defaultResults was null");
    }
    if (StringUtils.isBlank(customizerName)) {
        throw new RiceIllegalArgumentException("customizerName was null or blank");
    }
    DocumentSearchCustomizer customizer = loadCustomizer(customizerName);
    return customizer.customizeResults(documentSearchCriteria, defaultResults);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:17,
代码来源:DocumentSearchCustomizationHandlerServiceImpl.java

示例2: customizeResults

点赞 3

import org.kuali.rice.kew.framework.document.search.DocumentSearchResultValues; //导入依赖的package包/类
@Override
public DocumentSearchResultValues customizeResults(DocumentType documentType,
        DocumentSearchCriteria documentSearchCriteria, DocumentSearchResults results) {
    if (!results.getSearchResults().isEmpty()) {
        DocumentTypeAttributeBo customizerAttribute = documentType.getCustomizerAttribute();
        if (customizerAttribute != null) {
            DocumentSearchCustomizationHandlerService service = loadCustomizationService(customizerAttribute.getRuleAttribute().getApplicationId());
            if (service.getEnabledCustomizations(documentType.getName(), customizerAttribute.getRuleAttribute().getName()).contains(
                    DocumentSearchCustomization.RESULTS)) {
                DocumentSearchResultValues customizedResults = service.customizeResults(documentSearchCriteria, results.getSearchResults(), customizerAttribute.getRuleAttribute().getName());
                if (customizedResults != null) {
                    return customizedResults;
                }
            }
        }
        return null;
    }
    return null;
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:20,
代码来源:DocumentSearchCustomizationMediatorImpl.java

示例3: customizeResults

点赞 3

import org.kuali.rice.kew.framework.document.search.DocumentSearchResultValues; //导入依赖的package包/类
@Override
public DocumentSearchResultValues customizeResults(DocumentSearchCriteria documentSearchCriteria,
        List<DocumentSearchResult> defaultResults) {
    if (defaultResults.size() == 1) {
        assertEquals(1, defaultResults.size());
        DocumentSearchResultValues.Builder valuesBuilder = DocumentSearchResultValues.Builder.create();

        DocumentSearchResultValue.Builder resultValueBuilder = DocumentSearchResultValue.Builder.create(defaultResults.get(0).getDocument().getDocumentId());
        resultValueBuilder.getDocumentAttributes().add(DocumentAttributeFactory.loadContractIntoBuilder(DocumentAttributeFactory.createStringAttribute("myAttribute", "myCustomizedValue")));
        resultValueBuilder.getDocumentAttributes().add(DocumentAttributeFactory.loadContractIntoBuilder(DocumentAttributeFactory.createStringAttribute("myMultiValuedAttribute", "value0")));

        // Return if principal id was foudn in criteria
        if(StringUtils.isNotBlank(documentSearchCriteria.getDocSearchUserId())) {
             resultValueBuilder.getDocumentAttributes().add(DocumentAttributeFactory.loadContractIntoBuilder(DocumentAttributeFactory.createStringAttribute("criteriaUserId", documentSearchCriteria.getDocSearchUserId())));
        }

        valuesBuilder.getResultValues().add(resultValueBuilder);
        return valuesBuilder.build();
    } else {
        return null;
    }
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:23,
代码来源:DocumentSearchCustomizerTest.java

示例4: customizeResults

点赞 3

import org.kuali.rice.kew.framework.document.search.DocumentSearchResultValues; //导入依赖的package包/类
@Override
public DocumentSearchResultValues customizeResults(DocumentType documentType,
        DocumentSearchCriteria documentSearchCriteria, DocumentSearchResults results) {
    DocumentTypeAttributeBo customizerAttribute = documentType.getCustomizerAttribute();
    if (customizerAttribute != null) {
        DocumentSearchCustomizationHandlerService service = loadCustomizationService(customizerAttribute.getRuleAttribute().getApplicationId());
        if (service.getEnabledCustomizations(documentType.getName(), customizerAttribute.getRuleAttribute().getName()).contains(
                DocumentSearchCustomization.RESULTS)) {
            DocumentSearchResultValues customizedResults = service.customizeResults(documentSearchCriteria, results.getSearchResults(), customizerAttribute.getRuleAttribute().getName());
            if (customizedResults != null) {
                return customizedResults;
            }
        }
    }
    return null;
}
 

开发者ID:aapotts,
项目名称:kuali_rice,
代码行数:17,
代码来源:DocumentSearchCustomizationMediatorImpl.java

示例5: customizeResults

点赞 2

import org.kuali.rice.kew.framework.document.search.DocumentSearchResultValues; //导入依赖的package包/类
@Override
public DocumentSearchResultValues customizeResults(DocumentSearchCriteria documentSearchCriteria, List<DocumentSearchResult> defaultResults) {
    if ( LOG.isDebugEnabled() ) {
        LOG.debug( "customizeResults( " + documentSearchCriteria + ", " + defaultResults + " )" );
    }
    return null;
}
 

开发者ID:VU-libtech,
项目名称:OLE-INST,
代码行数:8,
代码来源:OLEDocumentSearchCustomizer.java

示例6: customizeResults

点赞 2

import org.kuali.rice.kew.framework.document.search.DocumentSearchResultValues; //导入依赖的package包/类
@Override
public final DocumentSearchResultValues customizeResults(DocumentSearchCriteria documentSearchCriteria,
        List<DocumentSearchResult> defaultResults) {
    return getDocumentSearchCustomizer().customizeResults(documentSearchCriteria, defaultResults);
}
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:6,
代码来源:DataDictionaryDocumentSearchCustomizer.java

示例7: customizeResults

点赞 1

import org.kuali.rice.kew.framework.document.search.DocumentSearchResultValues; //导入依赖的package包/类
/**
 * Optionally performs customization on the given set of document search results.  This could include changing
 * existing document values or synthesizing new ones.  The results of this method include a list of
 * {@link org.kuali.rice.kew.framework.document.search.DocumentSearchResultValue} objects, each of which are mapped to a
 * specific document id from the results and include additional key-value pairs for customized or synthesized
 * values for that document.  This method can return a null value if no customization was performed.
 *
 * @param documentType the document type to use when determining what customization logic (if any) should be invoked
 * @param documentSearchCriteria the criteria of the document search which produced the supplied results
 * @param results the results of the document search which are being considered for customization
 *
 * @return the customized result values, or null if not result customization was performed
 */
DocumentSearchResultValues customizeResults(DocumentType documentType,
        DocumentSearchCriteria documentSearchCriteria,
        DocumentSearchResults results);
 

开发者ID:kuali,
项目名称:kc-rice,
代码行数:17,
代码来源:DocumentSearchCustomizationMediator.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)