edu.sampleu.krms.impl
Class CampusAgendaTypeService

java.lang.Object
  extended by org.kuali.rice.kns.datadictionary.validation.AttributeValidatingTypeServiceBase
      extended by org.kuali.rice.krms.impl.type.KrmsTypeServiceBase
          extended by org.kuali.rice.krms.impl.type.AgendaTypeServiceBase
              extended by edu.sampleu.krms.impl.CampusAgendaTypeService
All Implemented Interfaces:
AgendaTypeService, RemotableAttributeOwner

public class CampusAgendaTypeService
extends AgendaTypeServiceBase

Sample AgendaTypeService that creates a RemotableAttributeField for specifying the campus


Nested Class Summary
 
Nested classes/interfaces inherited from class org.kuali.rice.kns.datadictionary.validation.AttributeValidatingTypeServiceBase
AttributeValidatingTypeServiceBase.TypeAttributeDefinition, AttributeValidatingTypeServiceBase.TypeAttributeValidationException
 
Field Summary
 
Fields inherited from class org.kuali.rice.krms.impl.type.AgendaTypeServiceBase
defaultAgendaTypeService
 
Constructor Summary
CampusAgendaTypeService()
           
 
Method Summary
 void setConfigurationService(ConfigurationService configurationService)
           
 RemotableAttributeField translateTypeAttribute(KrmsTypeAttribute inputAttribute, KrmsAttributeDefinition attributeDefinition)
          Translate a KrmsTypeAttribute into a RemotableAttributeField.
 List<RemotableAttributeError> validateAttributes(String krmsTypeId, Map<String,String> attributes)
          This is the default implementation.
 
Methods inherited from class org.kuali.rice.krms.impl.type.AgendaTypeServiceBase
loadAgenda
 
Methods inherited from class org.kuali.rice.krms.impl.type.KrmsTypeServiceBase
getAttributeFields, getDataDictionaryRemoteFieldService, getTypeAttributeDefinitions, sortFields, validateAttributesAgainstExisting, validateNonDataDictionaryAttribute
 
Methods inherited from class org.kuali.rice.kns.datadictionary.validation.AttributeValidatingTypeServiceBase
createErrorString, extractErrorsFromGlobalVariablesErrorMap, getAttributeErrorLabel, getAttributeFormatter, getAttributeValidatingExpression, getConfigurationService, getDataDictionaryService, getDictionaryValidationService, validateAttributeFormat, validateAttributeRequired, validateDataDictionaryAttribute, validatePrimitiveAttributeFromDescriptor, validateReferencesExistAndActive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.kuali.rice.krms.framework.type.RemotableAttributeOwner
getAttributeFields, validateAttributesAgainstExisting
 

Constructor Detail

CampusAgendaTypeService

public CampusAgendaTypeService()
Method Detail

translateTypeAttribute

public RemotableAttributeField translateTypeAttribute(KrmsTypeAttribute inputAttribute,
                                                      KrmsAttributeDefinition attributeDefinition)
Description copied from class: KrmsTypeServiceBase
Translate a KrmsTypeAttribute into a RemotableAttributeField. Override this method to provide custom translation of certain attributes.

Overrides:
translateTypeAttribute in class KrmsTypeServiceBase
Parameters:
inputAttribute - the KrmsTypeAttribute to translate
attributeDefinition - the KrmsAttributeDefinition for the given inputAttribute
Returns:
a RemotableAttributeField for the given inputAttribute

setConfigurationService

public void setConfigurationService(ConfigurationService configurationService)

validateAttributes

public List<RemotableAttributeError> validateAttributes(String krmsTypeId,
                                                        Map<String,String> attributes)
                                                 throws RiceIllegalArgumentException
Description copied from class: AttributeValidatingTypeServiceBase

This is the default implementation. It calls into the service for each attribute to validate it there. No combination validation is done. That should be done by overriding this method.

This implementation calls AttributeValidatingTypeServiceBase.getTypeAttributeDefinitions(String) to retrieve module-agnostic representations. It then iterates through the entry set of attributes, and calls AttributeValidatingTypeServiceBase.validateNonDataDictionaryAttribute(org.kuali.rice.core.api.uif.RemotableAttributeField, String, String) or AttributeValidatingTypeServiceBase.validateDataDictionaryAttribute(org.kuali.rice.kns.datadictionary.validation.AttributeValidatingTypeServiceBase.TypeAttributeDefinition, String, String) as appropriate. Lastly it calls AttributeValidatingTypeServiceBase.validateReferencesExistAndActive(java.util.Map, java.util.Map, java.util.List).

Specified by:
validateAttributes in interface RemotableAttributeOwner
Overrides:
validateAttributes in class KrmsTypeServiceBase
Parameters:
krmsTypeId - the identifier for the type
attributes - the Map of attribute names to values
Returns:
the List of errors (RemotableAttributeErrors) encountered during validation.
Throws:
RiceIllegalArgumentException


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.