当前位置: 首页>>代码示例>>Java>>正文


Java KRADConstants.MAINTENANCE_ADD_PREFIX属性代码示例

本文整理汇总了Java中org.kuali.rice.krad.util.KRADConstants.MAINTENANCE_ADD_PREFIX属性的典型用法代码示例。如果您正苦于以下问题:Java KRADConstants.MAINTENANCE_ADD_PREFIX属性的具体用法?Java KRADConstants.MAINTENANCE_ADD_PREFIX怎么用?Java KRADConstants.MAINTENANCE_ADD_PREFIX使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.kuali.rice.krad.util.KRADConstants的用法示例。


在下文中一共展示了KRADConstants.MAINTENANCE_ADD_PREFIX属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: populateAttachmentFile

private void populateAttachmentFile(MaintenanceDocumentBase maintenanceDocument, String propertyName, FormFile propertyValue) {
     if(StringUtils.isNotEmpty(((FormFile)propertyValue).getFileName())) {
 	 Object boClass;
         String boPropertyName;

         Matcher matcher = ELEMENT_IN_COLLECTION.matcher(propertyName);
         if (propertyName.startsWith(KRADConstants.MAINTENANCE_ADD_PREFIX)) {
             String prefix = matcher.matches() ? "" : KRADConstants.MAINTENANCE_ADD_PREFIX;
             String collectionName = parseAddCollectionName(propertyName.substring(prefix.length()));
             boClass = maintenanceDocument.getNewMaintainableObject().getNewCollectionLine(collectionName);
             boPropertyName = propertyName.substring(prefix.length()).substring(collectionName.length() + 1);

             setAttachmentProperty(boClass, boPropertyName, propertyValue);
         } else {
             boClass = maintenanceDocument.getNewMaintainableObject().getBusinessObject();
             boPropertyName = propertyName;
             if(StringUtils.isNotEmpty(((FormFile)propertyValue).getFileName())
                     && !matcher.matches()) {
                 maintenanceDocument.setFileAttachment((FormFile) propertyValue);
             }
             setAttachmentProperty(boClass, boPropertyName, propertyValue);
         }
     }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:24,代码来源:KualiMaintenanceForm.java

示例2: setFieldQuickfinder

/**
 * Sets a fields quickfinder class and field conversions for an attribute.
 */
@Deprecated
public static Field setFieldQuickfinder(BusinessObject businessObject, String collectionName, boolean addLine, int index,
        String attributeName, Field field, List displayedFieldNames, SelectiveReferenceRefresher srr) {
    field = setFieldQuickfinder(businessObject, collectionName, addLine, index, attributeName, field, displayedFieldNames);
    if (srr != null) {
        String collectionPrefix = "";
        if ( collectionName != null ) {
            if (addLine) {
                collectionPrefix = KRADConstants.MAINTENANCE_ADD_PREFIX + collectionName + ".";
            }
            else {
                collectionPrefix = collectionName + "[" + index + "].";
            }
        }
        field.setReferencesToRefresh(convertReferencesToSelectCollectionToString(
                srr.getAffectedReferencesFromLookup(businessObject, attributeName, collectionPrefix)));
    }
    return field;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:22,代码来源:LookupUtils.java

示例3: processAddCollectionLineBusinessRules

public boolean processAddCollectionLineBusinessRules(MaintenanceDocument document, String collectionName,
        PersistableBusinessObject bo) {
    LOG.debug("processAddCollectionLineBusinessRules");

    // setup convenience pointers to the old & new bo
    setupBaseConvenienceObjects(document);

    // sanity check on the document object
    this.validateMaintenanceDocument(document);

    boolean success = true;
    MessageMap map = GlobalVariables.getMessageMap();
    int errorCount = map.getErrorCount();
    map.addToErrorPath(MAINTAINABLE_ERROR_PATH);
    if (LOG.isDebugEnabled()) {
        LOG.debug("processAddCollectionLineBusinessRules - BO: " + bo);
        LOG.debug("Before Validate: " + map);
    }
    //getBoDictionaryService().performForceUppercase(bo);
    getMaintDocDictionaryService().validateMaintainableCollectionsAddLineRequiredFields(document,
            document.getNewMaintainableObject().getBusinessObject(), collectionName);
    String errorPath = KRADConstants.MAINTENANCE_ADD_PREFIX + collectionName;
    map.addToErrorPath(errorPath);

    getDictionaryValidationService().validateBusinessObject(bo, false);
    success &= map.getErrorCount() == errorCount;
    success &= dictionaryValidationService.validateDefaultExistenceChecksForNewCollectionItem(
            document.getNewMaintainableObject().getBusinessObject(), bo, collectionName);
    success &= validateDuplicateIdentifierInDataDictionary(document, collectionName, bo);
    success &= processCustomAddCollectionLineBusinessRules(document, collectionName, bo);

    map.removeFromErrorPath(errorPath);
    map.removeFromErrorPath(MAINTAINABLE_ERROR_PATH);
    if (LOG.isDebugEnabled()) {
        LOG.debug("After Validate: " + map);
        LOG.debug("processAddCollectionLineBusinessRules returning: " + success);
    }

    return success;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:40,代码来源:MaintenanceDocumentRuleBase.java

示例4: setFieldQuickfinder

public static final Field setFieldQuickfinder(BusinessObject businessObject, String collectionName, boolean addLine, int index,
                                              String attributeName, Field field, List<String> displayedFieldNames, Maintainable maintainable, MaintainableFieldDefinition maintainableFieldDefinition) {
    if (maintainableFieldDefinition.getOverrideLookupClass() != null && StringUtils.isNotBlank(maintainableFieldDefinition.getOverrideFieldConversions())) {
        if (maintainable != null) {
            String collectionPrefix = "";
            if (collectionName != null) {
                if (addLine) {
                    collectionPrefix = KRADConstants.MAINTENANCE_ADD_PREFIX + collectionName + ".";
                } else {
                    collectionPrefix = collectionName + "[" + index + "].";
                }
            }
            field.setQuickFinderClassNameImpl(maintainableFieldDefinition.getOverrideLookupClass().getName());

            String prefixedFieldConversions = prefixFieldConversionsDestinationsWithCollectionPrefix(maintainableFieldDefinition.getOverrideFieldConversions(), collectionPrefix);
            field.setFieldConversions(prefixedFieldConversions);
            field.setBaseLookupUrl(LookupUtils.getBaseLookupUrl(false));
            field.setReferencesToRefresh(LookupUtils.convertReferencesToSelectCollectionToString(
                    maintainable.getAffectedReferencesFromLookup(businessObject, attributeName, collectionPrefix)));
        }
        return field;
    }
    if (maintainableFieldDefinition.isNoLookup()) {
        return field;
    }
    return LookupUtils.setFieldQuickfinder(businessObject, collectionName, addLine, index,
            attributeName, field, displayedFieldNames, maintainable);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:28,代码来源:MaintenanceUtils.java


注:本文中的org.kuali.rice.krad.util.KRADConstants.MAINTENANCE_ADD_PREFIX属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。