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

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

java 2次浏览

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

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

示例1: clearBusinessObjectOfRestrictedValues

点赞 3

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
/**
 * @see Maintainable#clearBusinessObjectOfRestrictedValues(org.kuali.rice.kns.document.authorization.MaintenanceDocumentRestrictions)
 */
@Override
public void clearBusinessObjectOfRestrictedValues(MaintenanceDocumentRestrictions maintenanceDocumentRestrictions) {
	List<MaintainableSectionDefinition> sections = getMaintenanceDocumentDictionaryService()
			.getMaintainableSections(getDocumentTypeName());
	for (MaintainableSectionDefinition sectionDefinition : sections) {
		for (MaintainableItemDefinition itemDefinition : sectionDefinition.getMaintainableItems()) {
			if (itemDefinition instanceof MaintainableFieldDefinition) {
				clearFieldRestrictedValues("", businessObject, (MaintainableFieldDefinition) itemDefinition,
						maintenanceDocumentRestrictions);
			}
			else if (itemDefinition instanceof MaintainableCollectionDefinition) {
				clearCollectionRestrictedValues("", businessObject,
						(MaintainableCollectionDefinition) itemDefinition, maintenanceDocumentRestrictions);
			}
		}
	}
}
 

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

示例2: clearCollectionRestrictedValues

点赞 3

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
protected void clearCollectionRestrictedValues(String fieldNamePrefix, BusinessObject businessObject,
		MaintainableCollectionDefinition collectionDefinition,
		MaintenanceDocumentRestrictions maintenanceDocumentRestrictions) {
	String collectionName = fieldNamePrefix + collectionDefinition.getName();
	Collection<BusinessObject> collection = (Collection<BusinessObject>) ObjectUtils.getPropertyValue(
			businessObject, collectionDefinition.getName());

	if (collection != null) {
		int i = 0;
		// even though it's technically a Collection, we're going to index
		// it like a list
		for (BusinessObject collectionItem : collection) {
			String collectionItemNamePrefix = collectionName + "[" + i + "].";
			for (MaintainableCollectionDefinition subCollectionDefinition : collectionDefinition
					.getMaintainableCollections()) {
				clearCollectionRestrictedValues(collectionItemNamePrefix, collectionItem, subCollectionDefinition,
						maintenanceDocumentRestrictions);
			}
			for (MaintainableFieldDefinition fieldDefinition : collectionDefinition.getMaintainableFields()) {
				clearFieldRestrictedValues(collectionItemNamePrefix, collectionItem, fieldDefinition,
						maintenanceDocumentRestrictions);
			}
			i++;
		}
	}
}
 

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

示例3: performForceUpperCase

点赞 3

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
protected void performForceUpperCase(Map fieldValues) {
	List<MaintainableSectionDefinition> sections = getMaintenanceDocumentDictionaryService()
			.getMaintainableSections(getDocumentTypeName());
	for (MaintainableSectionDefinition sectionDefinition : sections) {
		for (MaintainableItemDefinition itemDefinition : sectionDefinition.getMaintainableItems()) {
			if (itemDefinition instanceof MaintainableFieldDefinition) {
				performFieldForceUpperCase("", businessObject, (MaintainableFieldDefinition) itemDefinition,
						fieldValues);
			}
			else if (itemDefinition instanceof MaintainableCollectionDefinition) {
				performCollectionForceUpperCase("", businessObject,
						(MaintainableCollectionDefinition) itemDefinition, fieldValues);

			}
		}
	}
}
 

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

示例4: performCollectionForceUpperCase

点赞 3

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
protected void performCollectionForceUpperCase(String fieldNamePrefix, BusinessObject bo,
		MaintainableCollectionDefinition collectionDefinition, Map fieldValues) {
	String collectionName = fieldNamePrefix + collectionDefinition.getName();
	Collection<BusinessObject> collection = (Collection<BusinessObject>) ObjectUtils.getPropertyValue(bo,
			collectionDefinition.getName());
	if (collection != null) {
		int i = 0;
		// even though it's technically a Collection, we're going to index
		// it like a list
		for (BusinessObject collectionItem : collection) {
			String collectionItemNamePrefix = collectionName + "[" + i + "].";
			// String collectionItemNamePrefix = "";
			for (MaintainableFieldDefinition fieldDefinition : collectionDefinition.getMaintainableFields()) {
				performFieldForceUpperCase(collectionItemNamePrefix, collectionItem, fieldDefinition, fieldValues);
			}
			for (MaintainableCollectionDefinition subCollectionDefinition : collectionDefinition
					.getMaintainableCollections()) {
				performCollectionForceUpperCase(collectionItemNamePrefix, collectionItem, subCollectionDefinition,
						fieldValues);
			}
			i++;
		}
	}
}
 

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

示例5: generateMultipleValueLookupBOTemplate

点赞 3

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
/**
 * Returns the field templates defined in the maint dictionary xml files. Field templates are used in multiple value lookups.
 * When doing a MV lookup on a collection, the returned BOs are not necessarily of the same type as the elements of the
 * collection. Therefore, a means of mapping between the fields for the 2 BOs are necessary. The template attribute of
 * &lt;maintainableField&gt;s contained within &lt;maintainableCollection&gt;s tells us this mapping. Example: a
 * &lt;maintainableField name="collectionAttrib" template="lookupBOAttrib"&gt; definition means that when a list of BOs are
 * returned, the lookupBOAttrib value of the looked up BO will be placed into the collectionAttrib value of the BO added to the
 * collection
 *
 * @param sections       the sections of a document
 * @param collectionName the name of a collection. May be a nested collection with indices (e.g. collA[1].collB)
 * @return
 */
public static Map<String, String> generateMultipleValueLookupBOTemplate(List<MaintainableSectionDefinition> sections, String collectionName) {
    MaintainableCollectionDefinition definition = findMaintainableCollectionDefinition(sections, collectionName);
    if (definition == null) {
        return null;
    }
    Map<String, String> template = null;

    for (MaintainableFieldDefinition maintainableField : definition.getMaintainableFields()) {
        String templateString = maintainableField.getTemplate();
        if (StringUtils.isNotBlank(templateString)) {
            if (template == null) {
                template = new HashMap<String, String>();
            }
            template.put(maintainableField.getName(), templateString);
        }
    }
    return template;
}
 

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

示例6: retrievePropertyPathToAttributeSecurityMappings

点赞 3

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
public static Map<String, AttributeSecurity> retrievePropertyPathToAttributeSecurityMappings(String docTypeName) {
    Map<String, AttributeSecurity> results = new HashMap<String, AttributeSecurity>();
    MaintenanceDocumentEntry entry = getMaintenanceDocumentDictionaryService().getMaintenanceDocumentEntry(docTypeName);
    String className = entry.getDataObjectClass().getName();

    for (MaintainableSectionDefinition section : entry.getMaintainableSections()) {
        for (MaintainableItemDefinition item : section.getMaintainableItems()) {
            if (item instanceof MaintainableFieldDefinition) {
                MaintainableFieldDefinition field = (MaintainableFieldDefinition) item;
                AttributeSecurity attributeSecurity = getDataDictionaryService().getAttributeSecurity(className, field.getName());
                if (attributeSecurity != null) {
                    results.put(field.getName(), attributeSecurity);
                }
            } else if (item instanceof MaintainableCollectionDefinition) {
                addMaintenanceDocumentCollectionPathToSecurityMappings(results, "", (MaintainableCollectionDefinition) item);
            }
        }
    }
    return results;
}
 

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

示例7: validateBusinessObjectOnMaintenanceDocumentHelper

点赞 3

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
protected void validateBusinessObjectOnMaintenanceDocumentHelper(BusinessObject businessObject,
        List<? extends MaintainableItemDefinition> itemDefinitions, String errorPrefix) {
    for (MaintainableItemDefinition itemDefinition : itemDefinitions) {
        if (itemDefinition instanceof MaintainableFieldDefinition) {
            if (getDataDictionaryService().isAttributeDefined(businessObject.getClass(),
                    itemDefinition.getName())) {
                Object value = ObjectUtils.getPropertyValue(businessObject, itemDefinition.getName());
                if (value != null && StringUtils.isNotBlank(value.toString())) {
                    Class propertyType = ObjectUtils.getPropertyType(businessObject, itemDefinition.getName(), null);
                    if (TypeUtils.isStringClass(propertyType) ||
                            TypeUtils.isIntegralClass(propertyType) ||
                            TypeUtils.isDecimalClass(propertyType) ||
                            TypeUtils.isTemporalClass(propertyType)) {
                        // check value format against dictionary
                        if (!TypeUtils.isTemporalClass(propertyType)) {
                            validateAttributeFormat(businessObject.getClass().getName(), itemDefinition.getName(),
                                    value.toString(), errorPrefix + itemDefinition.getName());
                        }
                    }
                }
            }
        }
    }
}
 

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

示例8: validateMaintenanceRequiredFields

点赞 3

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
/**
 * @see org.kuali.rice.kns.service.MaintenanceDocumentDictionaryService#validateMaintenanceRequiredFields(org.kuali.rice.krad.maintenance.MaintenanceDocument)
 */
public void validateMaintenanceRequiredFields(MaintenanceDocument document) {
    Maintainable newMaintainableObject = document.getNewMaintainableObject();
    if (newMaintainableObject == null) {
        LOG.error("New maintainable is null");
        throw new RuntimeException("New maintainable is null");
    }

    List<MaintainableSectionDefinition> maintainableSectionDefinitions = getMaintainableSections(getDocumentTypeName(newMaintainableObject.getBoClass()));
    for (MaintainableSectionDefinition maintainableSectionDefinition : maintainableSectionDefinitions) {
        for (MaintainableItemDefinition maintainableItemDefinition : maintainableSectionDefinition.getMaintainableItems()) {
            // validate fields
            if (maintainableItemDefinition instanceof MaintainableFieldDefinition) {
                validateMaintainableFieldRequiredFields((MaintainableFieldDefinition) maintainableItemDefinition, newMaintainableObject.getBusinessObject(), maintainableItemDefinition.getName());
            }
            // validate collections
            else if (maintainableItemDefinition instanceof MaintainableCollectionDefinition) {
                validateMaintainableCollectionsRequiredFields(newMaintainableObject.getBusinessObject(), (MaintainableCollectionDefinition) maintainableItemDefinition);
            }
        }
    }
}
 

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

示例9: validateMaintainableCollectionsAddLineRequiredFields

点赞 3

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
/**
 * calls code to generate error messages if maintainableFields within any collections or sub-collections are marked as required
 * 
 * @param document
 * @param businessObject
 * @param collectionName
 * @param maintainableCollectionDefinition
 * @param depth
 */
private void validateMaintainableCollectionsAddLineRequiredFields(MaintenanceDocument document, PersistableBusinessObject businessObject, String collectionName, MaintainableCollectionDefinition maintainableCollectionDefinition, int depth) {
    if ( depth == 0 ) {
        GlobalVariables.getMessageMap().addToErrorPath("add");
    }
    // validate required fields on fields withing collection definition
    PersistableBusinessObject element = document.getNewMaintainableObject().getNewCollectionLine( collectionName );
    GlobalVariables.getMessageMap().addToErrorPath(collectionName);
    for (MaintainableFieldDefinition maintainableFieldDefinition : maintainableCollectionDefinition.getMaintainableFields()) {
        final String fieldName = maintainableFieldDefinition.getName();
        validateMaintainableFieldRequiredFields(maintainableFieldDefinition, element, fieldName);
        
    }

    GlobalVariables.getMessageMap().removeFromErrorPath(collectionName);
    if ( depth == 0 ) {
        GlobalVariables.getMessageMap().removeFromErrorPath("add");
    }
}
 

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

示例10: createGenericAccountingLineViewFieldDefinition

点赞 3

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
/**
 * @see org.kuali.ole.sys.document.service.AccountingLineRenderingService#createGenericAccountingLineViewFieldDefinition(org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition)
 */
public AccountingLineViewFieldDefinition createGenericAccountingLineViewFieldDefinition(MaintainableFieldDefinition currentDefinition) {
    AccountingLineViewFieldDefinition fieldDefinition = new AccountingLineViewFieldDefinition();
    
    fieldDefinition.setRequired(currentDefinition.isRequired());
    fieldDefinition.setUnconditionallyReadOnly(currentDefinition.isUnconditionallyReadOnly());
    fieldDefinition.setReadOnlyAfterAdd(currentDefinition.isReadOnlyAfterAdd());
    fieldDefinition.setNoLookup(currentDefinition.isNoLookup());
    
    fieldDefinition.setDefaultValue(currentDefinition.getDefaultValue());
    fieldDefinition.setTemplate(currentDefinition.getTemplate());
    fieldDefinition.setDefaultValueFinderClass(currentDefinition.getDefaultValueFinderClass());
    
    fieldDefinition.setOverrideLookupClass(currentDefinition.getOverrideLookupClass());
    fieldDefinition.setOverrideFieldConversions(currentDefinition.getOverrideFieldConversions());
    
    return fieldDefinition;
}
 

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

示例11: createGenericAccountingLineViewFieldDefinition

点赞 3

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
/**
 * @see org.kuali.kfs.sys.document.service.AccountingLineRenderingService#createGenericAccountingLineViewFieldDefinition(org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition)
 */
public AccountingLineViewFieldDefinition createGenericAccountingLineViewFieldDefinition(MaintainableFieldDefinition currentDefinition) {
    AccountingLineViewFieldDefinition fieldDefinition = new AccountingLineViewFieldDefinition();
    
    fieldDefinition.setRequired(currentDefinition.isRequired());
    fieldDefinition.setUnconditionallyReadOnly(currentDefinition.isUnconditionallyReadOnly());
    fieldDefinition.setReadOnlyAfterAdd(currentDefinition.isReadOnlyAfterAdd());
    fieldDefinition.setNoLookup(currentDefinition.isNoLookup());
    
    fieldDefinition.setDefaultValue(currentDefinition.getDefaultValue());
    fieldDefinition.setTemplate(currentDefinition.getTemplate());
    fieldDefinition.setDefaultValueFinderClass(currentDefinition.getDefaultValueFinderClass());
    
    fieldDefinition.setOverrideLookupClass(currentDefinition.getOverrideLookupClass());
    fieldDefinition.setOverrideFieldConversions(currentDefinition.getOverrideFieldConversions());
    
    return fieldDefinition;
}
 

开发者ID:kuali,
项目名称:kfs,
代码行数:21,
代码来源:AccountingLineRenderingServiceImpl.java

示例12: clearBusinessObjectOfRestrictedValues

点赞 3

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
/**
 * @see Maintainable#clearBusinessObjectOfRestrictedValues(org.kuali.rice.kns.document.authorization.MaintenanceDocumentRestrictions)
 */
public void clearBusinessObjectOfRestrictedValues(MaintenanceDocumentRestrictions maintenanceDocumentRestrictions) {
	List<MaintainableSectionDefinition> sections = getMaintenanceDocumentDictionaryService()
			.getMaintainableSections(getDocumentTypeName());
	for (MaintainableSectionDefinition sectionDefinition : sections) {
		for (MaintainableItemDefinition itemDefinition : sectionDefinition.getMaintainableItems()) {
			if (itemDefinition instanceof MaintainableFieldDefinition) {
				clearFieldRestrictedValues("", businessObject, (MaintainableFieldDefinition) itemDefinition,
						maintenanceDocumentRestrictions);
			}
			else if (itemDefinition instanceof MaintainableCollectionDefinition) {
				clearCollectionRestrictedValues("", businessObject,
						(MaintainableCollectionDefinition) itemDefinition, maintenanceDocumentRestrictions);
			}
		}
	}
}
 

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

示例13: validateBusinessObjectOnMaintenanceDocumentHelper

点赞 3

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
protected void validateBusinessObjectOnMaintenanceDocumentHelper(BusinessObject businessObject,
        List<? extends MaintainableItemDefinition> itemDefinitions, String errorPrefix) {
    for (MaintainableItemDefinition itemDefinition : itemDefinitions) {
        if (itemDefinition instanceof MaintainableFieldDefinition) {
            if (getDataDictionaryService().isAttributeDefined(businessObject.getClass(),
                    itemDefinition.getName())) {
                Object value = ObjectUtils.getPropertyValue(businessObject, itemDefinition.getName());
                if (value != null && StringUtils.isNotBlank(value.toString())) {
                    Class propertyType = ObjectUtils.getPropertyType(businessObject, itemDefinition.getName(),
                            persistenceStructureService);
                    if (TypeUtils.isStringClass(propertyType) ||
                            TypeUtils.isIntegralClass(propertyType) ||
                            TypeUtils.isDecimalClass(propertyType) ||
                            TypeUtils.isTemporalClass(propertyType)) {
                        // check value format against dictionary
                        if (!TypeUtils.isTemporalClass(propertyType)) {
                            validateAttributeFormat(businessObject.getClass().getName(), itemDefinition.getName(),
                                    value.toString(), errorPrefix + itemDefinition.getName());
                        }
                    }
                }
            }
        }
    }
}
 

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

示例14: getDuplicateIdentifierFieldsFromDataDictionary

点赞 2

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
/**
 * This method is to retrieve a List of fields which are specified in the
 * maintenance document data dictionary as the
 * duplicateIdentificationFields. This List is used to determine whether the
 * new entry being added to the collection is a duplicate entry and if so,
 * we should not add the new entry to the existing collection
 *
 * @param docTypeName
 * @param collectionName
 */
@Override
public List<String> getDuplicateIdentifierFieldsFromDataDictionary(String docTypeName, String collectionName) {
	List<String> duplicateIdentifierFieldNames = new ArrayList<String>();
	MaintainableCollectionDefinition collDef = getMaintenanceDocumentDictionaryService().getMaintainableCollection(
			docTypeName, collectionName);
	Collection<MaintainableFieldDefinition> fieldDef = collDef.getDuplicateIdentificationFields();
	for (MaintainableFieldDefinition eachFieldDef : fieldDef) {
		duplicateIdentifierFieldNames.add(eachFieldDef.getName());
	}
	return duplicateIdentifierFieldNames;
}
 

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

示例15: setGenerateBlankRequiredValues

点赞 2

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
/**
 *
 * @see Maintainable#setGenerateBlankRequiredValues()
 */
@Override
public void setGenerateBlankRequiredValues(String docTypeName) {
	try {
		List<MaintainableSectionDefinition> sectionDefinitions = getMaintenanceDocumentDictionaryService()
				.getMaintainableSections(docTypeName);
		Map<String, String> defaultValues = new HashMap<String, String>();

		for (MaintainableSectionDefinition maintSectionDef : sectionDefinitions) {
			for (MaintainableItemDefinition item : maintSectionDef.getMaintainableItems()) {
				if (item instanceof MaintainableFieldDefinition) {
					MaintainableFieldDefinition maintainableFieldDefinition = (MaintainableFieldDefinition) item;
					if (maintainableFieldDefinition.isRequired()
							&& maintainableFieldDefinition.isUnconditionallyReadOnly()) {
						Object currPropVal = ObjectUtils.getPropertyValue(this.getBusinessObject(), item.getName());
						if (currPropVal == null
								|| (currPropVal instanceof String && StringUtils.isBlank((String) currPropVal))) {
							Class<? extends ValueFinder> defaultValueFinderClass = maintainableFieldDefinition
									.getDefaultValueFinderClass();
							if (defaultValueFinderClass != null) {
								String defaultValue = defaultValueFinderClass.newInstance().getValue();
								if (defaultValue != null) {
									defaultValues.put(item.getName(), defaultValue);
								}
							}
						}
					}
				}
			}
		}
		FieldUtils.populateBusinessObjectFromMap(getBusinessObject(), defaultValues);
	}
	catch (Exception e) {
		LOG.error("Unable to set blank required value " + e.getMessage(), e);
		throw new RuntimeException("Unable to set blank required value" + e.getMessage(), e);
	}
}
 

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

示例16: setFieldQuickfinder

点赞 2

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
/**
 * Checks to see if there has been an override lookup declared for the maintenance field. If so, the override will be used for
 * the quickfinder and lookup utils will not be called. If no override was given, LookupUtils.setFieldQuickfinder will be called
 * to set the system generated quickfinder based on the attributes relationship to the parent business object.
 *
 * @return Field with quickfinder set if one was found
 */
public static final Field setFieldQuickfinder(BusinessObject businessObject, String attributeName, MaintainableFieldDefinition maintainableFieldDefinition, Field field, List<String> displayedFieldNames, SelectiveReferenceRefresher srr) {
    if (maintainableFieldDefinition.getOverrideLookupClass() != null && StringUtils.isNotBlank(maintainableFieldDefinition.getOverrideFieldConversions())) {
        field.setQuickFinderClassNameImpl(maintainableFieldDefinition.getOverrideLookupClass().getName());
        field.setFieldConversions(maintainableFieldDefinition.getOverrideFieldConversions());
        field.setBaseLookupUrl(LookupUtils.getBaseLookupUrl(false));
        field.setReferencesToRefresh(LookupUtils.convertReferencesToSelectCollectionToString(
                srr.getAffectedReferencesFromLookup(businessObject, attributeName, "")));
        return field;
    }
    if (maintainableFieldDefinition.isNoLookup()) {
        return field;
    }
    return LookupUtils.setFieldQuickfinder(businessObject, null, false, 0, attributeName, field, displayedFieldNames, maintainableFieldDefinition.isNoLookup());
}
 

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

示例17: addMaintenanceDocumentCollectionPathToSecurityMappings

点赞 2

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
private static void addMaintenanceDocumentCollectionPathToSecurityMappings(Map<String, AttributeSecurity> mappings, String propertyPathPrefix, MaintainableCollectionDefinition collectionDefinition) {
    propertyPathPrefix = propertyPathPrefix + collectionDefinition.getName() + ".";
    String boClassName = collectionDefinition.getBusinessObjectClass().getName();
    for (MaintainableFieldDefinition field : collectionDefinition.getMaintainableFields()) {
        AttributeSecurity attributeSecurity = getDataDictionaryService().getAttributeSecurity(boClassName, field.getName());
        if (attributeSecurity != null) {
            mappings.put(propertyPathPrefix + field.getName(), attributeSecurity);
        }
    }
    for (MaintainableCollectionDefinition nestedCollection : collectionDefinition.getMaintainableCollections()) {
        addMaintenanceDocumentCollectionPathToSecurityMappings(mappings, propertyPathPrefix, nestedCollection);
    }
}
 

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

示例18: populateSerializablePropertiesWithItems

点赞 2

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
private void populateSerializablePropertiesWithItems(String basePath, List<MaintainableItemDefinition> maintainableItems){
	for(MaintainableItemDefinition maintainableItemDefinition: maintainableItems){
        if(maintainableItemDefinition instanceof MaintainableFieldDefinition){
            serializableProperties.addSerializablePropertyName(getFullItemName(basePath, maintainableItemDefinition.getName()), true);
        } else if(maintainableItemDefinition instanceof MaintainableCollectionDefinition){
        	serializableProperties.addSerializablePropertyName(getFullItemName(basePath, maintainableItemDefinition.getName()), true);
        	populateSerializablePropertiesWithItems(getFullItemName(basePath, maintainableItemDefinition.getName()), 
        			getAllMaintainableFieldDefinitionsForSerialization(
        			(MaintainableCollectionDefinition)maintainableItemDefinition));            	
        } else if(maintainableItemDefinition instanceof MaintainableSubSectionHeaderDefinition){
        	//Ignore
        }
	}
}
 

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

示例19: getAllMaintainableFieldDefinitionsForSerialization

点赞 2

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
public List<MaintainableItemDefinition> getAllMaintainableFieldDefinitionsForSerialization(
   		MaintainableCollectionDefinition maintainableCollectionDefinition){
	List<MaintainableItemDefinition> allMaintainableItemDefinitions = new ArrayList<MaintainableItemDefinition>();

	if(maintainableCollectionDefinition.getMaintainableFields()!=null){
		allMaintainableItemDefinitions.addAll(maintainableCollectionDefinition.getMaintainableFields());
	}

	if(maintainableCollectionDefinition.getSummaryFields()!=null){
		allMaintainableItemDefinitions.addAll(
				(List<MaintainableFieldDefinition>)maintainableCollectionDefinition.getSummaryFields());
	}

	if(maintainableCollectionDefinition.getDuplicateIdentificationFields()!=null){
		allMaintainableItemDefinitions.addAll(maintainableCollectionDefinition.getDuplicateIdentificationFields());
	}

	/*if(maintainableCollectionMap!=null){
		updateMaintainableCollectionDefinitionForSerialization(maintainableCollectionMap.values());
		allMaintainableItemDefinitions.addAll(maintainableCollectionMap.values());
	}*/
	if(maintainableCollectionDefinition.getMaintainableCollections()!=null){
		allMaintainableItemDefinitions.addAll(maintainableCollectionDefinition.getMaintainableCollections());
	}

	return allMaintainableItemDefinitions;
}
 

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

示例20: buildMaintainableItemMap

点赞 2

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
private ExportMap buildMaintainableItemMap(MaintainableItemDefinition item) {
     ExportMap itemMap = new ExportMap(item.getName());

     if (item instanceof MaintainableFieldDefinition) {
         MaintainableFieldDefinition field = (MaintainableFieldDefinition) item;

         itemMap.set("field", "true");
         itemMap.set("name", field.getName());
         itemMap.set("required", Boolean.toString(field.isRequired()));
if (StringUtils.isNotBlank(field.getAlternateDisplayAttributeName())) {
	itemMap.set("alternateDisplayAttributeName", field.getAlternateDisplayAttributeName());
}
if (StringUtils.isNotBlank(field.getAdditionalDisplayAttributeName())) {
	itemMap.set("additionalDisplayAttributeName", field.getAdditionalDisplayAttributeName());
}
     }
     else if (item instanceof MaintainableCollectionDefinition) {
         MaintainableCollectionDefinition collection = (MaintainableCollectionDefinition) item;

         itemMap.set("collection", "true");
         itemMap.set("name", collection.getName());
         itemMap.set("dataObjectClass", collection.getBusinessObjectClass().getName());
     }
     else if (item instanceof MaintainableSubSectionHeaderDefinition) {
         MaintainableSubSectionHeaderDefinition subSectionHeader = (MaintainableSubSectionHeaderDefinition) item;
         itemMap.set("name", subSectionHeader.getName());
     }
     else {
         throw new IllegalStateException("unable to create itemMap for unknown MaintainableItem subclass '" + item.getClass().getName() + "'");
     }

     return itemMap;
 }
 

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

示例21: getMaintainableField

点赞 2

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
public MaintainableFieldDefinition getMaintainableField(String docTypeName, String fieldName) {
    MaintainableItemDefinition item = getMaintainableItem(docTypeName, fieldName);
    if (item != null && item instanceof MaintainableFieldDefinition) {
        return (MaintainableFieldDefinition) item;
    }
    return null;
}
 

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

示例22: populateFieldWithDefault

点赞 2

import org.kuali.rice.kns.datadictionary.MaintainableFieldDefinition; //导入依赖的package包/类
/**
 * Populates a maintenance field with its default value
 * @param field the field to populate with a default value
 * @param fieldDefinition the data dictionary definition of the field to transform
 * 
 * KRAD Conversion: Performs the customization of the field properties
 */
protected void populateFieldWithDefault(Field field, MaintainableFieldDefinition fieldDefinition) {
    try {
        Class defaultValueFinderClass = fieldDefinition.getDefaultValueFinderClass();
        if (defaultValueFinderClass != null) {
            field.setPropertyValue(((ValueFinder) defaultValueFinderClass.newInstance()).getValue());
        }
    }
    catch (InstantiationException ie) {
        throw new RuntimeException("Default Value Finder Class "+fieldDefinition.getDefaultValueFinderClass().getName()+" for property "+field.getPropertyName()+" could not be instantiated");
    }
    catch (IllegalAccessException e) {
        throw new RuntimeException("Default Value Finder Class "+fieldDefinition.getDefaultValueFinderClass().getName()+" for property "+field.getPropertyName()+" was accessed illegally");
    }
}
 

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


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