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


Java AttributeDefinition.getControl方法代码示例

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


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

示例1: getAttributeControlDefinition

import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
/**
 * @see org.kuali.rice.krad.service.DataDictionaryService#getAttributeControlDefinition(java.lang.String)
 */
@Override
public ControlDefinition getAttributeControlDefinition(String entryName, String attributeName) {
    ControlDefinition controlDefinition = null;

    AttributeDefinition attributeDefinition = getAttributeDefinition(entryName, attributeName);
    if (attributeDefinition != null) {
        controlDefinition = attributeDefinition.getControl();
    }

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

示例2: getAttributeSize

import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
/**
 * @see org.kuali.rice.krad.service.DataDictionaryService#getAttributeSize(java.lang.String)
 */
@Override
public Integer getAttributeSize(String entryName, String attributeName) {
    Integer size = null;

    AttributeDefinition attributeDefinition = getAttributeDefinition(entryName, attributeName);
    if (attributeDefinition != null) {
        ControlDefinition controlDefinition = attributeDefinition.getControl();
        if (controlDefinition.isText() || controlDefinition.isCurrency()) {
            size = controlDefinition.getSize();
        }
    }

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

示例3: getAttributeControlDefinition

import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
@Override
public ControlDefinition getAttributeControlDefinition(String entryName, String attributeName) {
       ControlDefinition controlDefinition = null;

       AttributeDefinition attributeDefinition = getAttributeDefinition(entryName, attributeName);
       if (attributeDefinition != null) {
           controlDefinition = attributeDefinition.getControl();
       }

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

示例4: getAttributeSize

import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
@Override
public Integer getAttributeSize(String entryName, String attributeName) {
       Integer size = null;

       AttributeDefinition attributeDefinition = getAttributeDefinition(entryName, attributeName);
       if (attributeDefinition != null) {
           ControlDefinition controlDefinition = attributeDefinition.getControl();
           if (controlDefinition.isText() || controlDefinition.isCurrency()) {
               size = controlDefinition.getSize();
           }
       }

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

示例5: considerCustomButtonFieldAuthorization

import org.kuali.rice.krad.datadictionary.AttributeDefinition; //导入方法依赖的package包/类
/**
 * @param dataObjectEntry if collectionItemBusinessObject is not null, then it is the DD entry for collectionItemBusinessObject.
 * Otherwise, it is the entry for primaryBusinessObject
 * @param primaryDataObject the top-level BO that is being inquiried or maintained
 * @param collectionItemBusinessObject an element of a collection under the primaryBusinessObject that we are evaluating view auths for
 * @param user the logged in user
 * @param businessObjectAuthorizer
 * @param inquiryOrMaintenanceDocumentRestrictions
 * @param propertyPrefix
 */
protected void considerCustomButtonFieldAuthorization(
		DataObjectEntry dataObjectEntry,
		Object primaryDataObject,
		BusinessObject collectionItemBusinessObject,
		Person user,
		BusinessObjectAuthorizer businessObjectAuthorizer,
		MaintenanceDocumentRestrictions maintenanceDocumentRestrictions,
		String propertyPrefix) {
	for (String attributeName : dataObjectEntry.getAttributeNames()) {
		AttributeDefinition attributeDefinition = dataObjectEntry
				.getAttributeDefinition(attributeName);
		// TODO what is the equivalent of control.isButton in KRAD
		if (attributeDefinition.getControl() != null &&
		        attributeDefinition.getControl().isButton()) {
			Map<String, String> collectionItemPermissionDetails = new HashMap<String, String>();
			Map<String, String> collectionItemRoleQualifications = null;
			if (ObjectUtils.isNotNull(collectionItemBusinessObject)) {
				collectionItemPermissionDetails.putAll(getButtonFieldPermissionDetails(collectionItemBusinessObject, attributeName));
				collectionItemPermissionDetails.putAll(businessObjectAuthorizer.
						getCollectionItemPermissionDetails(collectionItemBusinessObject));
				collectionItemRoleQualifications = new HashMap<String, String>(businessObjectAuthorizer.
						getCollectionItemRoleQualifications(collectionItemBusinessObject));
			}
			else {
				getButtonFieldPermissionDetails(primaryDataObject, attributeName);
			}

			if (!businessObjectAuthorizer
					.isAuthorizedByTemplate(
							primaryDataObject,
							KRADConstants.KNS_NAMESPACE,
							KimConstants.PermissionTemplateNames.PERFORM_CUSTOM_MAINTENANCE_DOCUMENT_FUNCTION,
							user.getPrincipalId(),
							collectionItemPermissionDetails,
							collectionItemRoleQualifications)) {
				maintenanceDocumentRestrictions
						.addHiddenField(propertyPrefix + attributeName);
			}
		}
	}
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:52,代码来源:BusinessObjectAuthorizationServiceImpl.java


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