public abstract class KrmsTypeServiceBase extends org.kuali.rice.krad.datadictionary.validation.AttributeValidatingTypeServiceBase implements RemotableAttributeOwner
KrmsTypeServiceBase is an abstract class providing default implementation and hooks for
provisioning and validating the custom attributes of a krms type. Is should probably be mentioned that the
default validation methods don't actually check anything, they just return empty error lists.org.kuali.rice.krad.datadictionary.validation.AttributeValidatingTypeServiceBase.TypeAttributeDefinition, org.kuali.rice.krad.datadictionary.validation.AttributeValidatingTypeServiceBase.TypeAttributeValidationException| Constructor and Description |
|---|
KrmsTypeServiceBase() |
createErrorString, extractErrorsFromGlobalVariablesErrorMap, getAttributeErrorLabel, getAttributeFormatter, getAttributeValidatingExpression, getConfigurationService, getDataDictionaryService, getDictionaryValidationService, validateAttributeFormat, validateAttributeRequired, validateDataDictionaryAttribute, validatePrimitiveAttributeFromDescriptor, validateReferencesExistAndActivepublic KrmsTypeServiceBase()
public List<org.kuali.rice.core.api.uif.RemotableAttributeField> getAttributeFields(String krmsTypeId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
get the RemotableAttributeFields for the custom attributes of this krms type. This implementation
will (by default) return any attributes mapped to the type via
KrmsTypeAttributeBo. If there is is a component name defined on the
related KrmsAttributeDefinitionBo then that will be used to generate
the RemotableAttributeField. If not, then a simple text input will be produced.
An extending class can also override the
translateTypeAttribute(org.kuali.rice.krms.api.repository.type.KrmsTypeAttribute,
org.kuali.rice.krms.api.repository.type.KrmsAttributeDefinition)
method which is called from here, and within it hand create the RemotableAttributeField for a certain attribute.
Also handy for extenders to know, this method delegates to getTypeAttributeDefinitions(String) and
then pulls out the RemotableAttributeFields from the returned TypeAttributeDefinitions
getAttributeFields in interface RemotableAttributeOwnerkrmsTypeId - the people flow type identifier. Must not be null or blank.org.kuali.rice.core.api.exception.RiceIllegalArgumentExceptionprotected List<org.kuali.rice.krad.datadictionary.validation.AttributeValidatingTypeServiceBase.TypeAttributeDefinition> getTypeAttributeDefinitions(String krmsTypeId)
TypeAttributeDefinitions for the attributes on the KRMS type specified by the
given krmsTypeId.getTypeAttributeDefinitions in class org.kuali.rice.krad.datadictionary.validation.AttributeValidatingTypeServiceBasekrmsTypeId - the ID of the KRMS Type whose attributes we are getting.TypeAttributeDefinitionsAttributeValidatingTypeServiceBaseprotected void sortFields(List<org.kuali.rice.krad.datadictionary.validation.AttributeValidatingTypeServiceBase.TypeAttributeDefinition> results, Map<String,Integer> sortCodeMap)
public List<org.kuali.rice.core.api.uif.RemotableAttributeError> validateAttributes(String krmsTypeId, Map<String,String> attributes) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
validateAttributes in interface RemotableAttributeOwnervalidateAttributes in class org.kuali.rice.krad.datadictionary.validation.AttributeValidatingTypeServiceBaseorg.kuali.rice.core.api.exception.RiceIllegalArgumentExceptionpublic List<org.kuali.rice.core.api.uif.RemotableAttributeError> validateAttributesAgainstExisting(String krmsTypeId, Map<String,String> newAttributes, Map<String,String> oldAttributes) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException
validateAttributesAgainstExisting in interface RemotableAttributeOwnerorg.kuali.rice.core.api.exception.RiceIllegalArgumentExceptionpublic org.kuali.rice.core.api.uif.RemotableAttributeField translateTypeAttribute(org.kuali.rice.krms.api.repository.type.KrmsTypeAttribute inputAttribute, org.kuali.rice.krms.api.repository.type.KrmsAttributeDefinition attributeDefinition)
KrmsTypeAttribute into a RemotableAttributeField.
Override this method to provide custom translation of certain attributes.inputAttribute - the KrmsTypeAttribute to translateattributeDefinition - the KrmsAttributeDefinition for the given inputAttributeRemotableAttributeField for the given inputAttributepublic DataDictionaryRemoteFieldService getDataDictionaryRemoteFieldService()
protected List<org.kuali.rice.core.api.uif.RemotableAttributeError> validateNonDataDictionaryAttribute(org.kuali.rice.core.api.uif.RemotableAttributeField attr, String key, String value)
Copyright © 2005–2017 The Kuali Foundation. All rights reserved.