org.kuali.student.core.enumerationmanagement.service
Interface EnumerationManagementService

All Superinterfaces:
DictionaryService, SearchService
All Known Implementing Classes:
EnumerationManagementServiceImpl

public interface EnumerationManagementService
extends DictionaryService, SearchService


Method Summary
 EnumeratedValueInfo addEnumeratedValue(String enumerationKey, EnumeratedValueInfo enumeratedValue)
          Adds an value to a particular Enumeration.
 List<EnumeratedValueInfo> getEnumeratedValues(String enumerationKey, String contextKey, String contextValue, Date contextDate)
          Retrieves the list of values for a particular enumeration with a certain context for a particular date.
 EnumerationInfo getEnumeration(String enumerationKey)
          Retrieves meta information for a particular Enumeration.
 List<EnumerationInfo> getEnumerations()
          Retrieves the list of meta information for the enumerations supported by this service.
 StatusInfo removeEnumeratedValue(String enumerationKey, String code)
          Removes a value from a particular Enumeration.
 EnumeratedValueInfo updateEnumeratedValue(String enumerationKey, String code, EnumeratedValueInfo enumeratedValue)
          Updates a value in a particular Enumeration.
 
Methods inherited from interface org.kuali.student.common.dictionary.service.DictionaryService
getObjectStructure, getObjectTypes
 
Methods inherited from interface org.kuali.student.common.search.service.SearchService
getSearchCriteriaType, getSearchCriteriaTypes, getSearchResultType, getSearchResultTypes, getSearchType, getSearchTypes, getSearchTypesByCriteria, getSearchTypesByResult, search
 

Method Detail

getEnumerations

List<EnumerationInfo> getEnumerations()
                                      throws OperationFailedException
Retrieves the list of meta information for the enumerations supported by this service.

Returns:
list of enumeration meta information
Throws:
OperationFailedException - unable to complete request

getEnumeration

EnumerationInfo getEnumeration(String enumerationKey)
                               throws DoesNotExistException,
                                      InvalidParameterException,
                                      MissingParameterException,
                                      OperationFailedException
Retrieves meta information for a particular Enumeration. The meta information should describe constraints on the various fields comprising the enumeration as well as the allowed contexts.

Parameters:
enumerationKey - Identifier for the Enumeration
Returns:
Meta information about an enumeration
Throws:
DoesNotExistException - enumerationKey not found
InvalidParameterException - invalid enumerationKey
MissingParameterException - missing enumerationKey
OperationFailedException - unable to complete request

getEnumeratedValues

List<EnumeratedValueInfo> getEnumeratedValues(String enumerationKey,
                                              String contextKey,
                                              String contextValue,
                                              Date contextDate)
                                              throws DoesNotExistException,
                                                     InvalidParameterException,
                                                     MissingParameterException,
                                                     OperationFailedException
Retrieves the list of values for a particular enumeration with a certain context for a particular date. The values returned should be those where the supplied date is between the effective and expiration dates. Certain enumerations may not support this functionality.

Parameters:
enumerationKey - Identifier for the Enumeration
contextType - Identifier for the enumeration context type
contextValue - Value for the enumeration context
contextDate - date and time to get the enumeration for
Returns:
list of Codes and Values
Throws:
DoesNotExistException - enumerationKey not found
InvalidParameterException - invalid enumerationKey, contextKey, contextValue, contextDate
MissingParameterException - missing enumerationKey, contextKey, contextValue, contextDate
OperationFailedException - unable to complete request

addEnumeratedValue

EnumeratedValueInfo addEnumeratedValue(String enumerationKey,
                                       EnumeratedValueInfo enumeratedValue)
                                       throws AlreadyExistsException,
                                              InvalidParameterException,
                                              MissingParameterException,
                                              OperationFailedException,
                                              PermissionDeniedException
Adds an value to a particular Enumeration.

Parameters:
enumerationKey - Identifier for the Enumeration
enumeratedValue - Value to be added
Returns:
newly created enumerated value
Throws:
AlreadyExistsException - enumerated value already exists
InvalidParameterException - invalid enumerationKey, code, enumeratedValue
MissingParameterException - missing enumerationKey, code, enumeratedValue
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

updateEnumeratedValue

EnumeratedValueInfo updateEnumeratedValue(String enumerationKey,
                                          String code,
                                          EnumeratedValueInfo enumeratedValue)
                                          throws DoesNotExistException,
                                                 InvalidParameterException,
                                                 MissingParameterException,
                                                 OperationFailedException,
                                                 PermissionDeniedException
Updates a value in a particular Enumeration. The pattern in this signature is different from most updates in that it is unlikely for multiple individuals or processes to be altering the same construct at the same time.

Parameters:
enumerationKey - Identifier for the Enumeration
code - code identifying the value to be updated
enumeratedValue - updated information on the value
Returns:
updated enumerated value
Throws:
DoesNotExistException - enumerationKey, code not found
InvalidParameterException - invalid enumerationKey, enumeratedValue
MissingParameterException - missing enumerationKey, enumeratedValue
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure

removeEnumeratedValue

StatusInfo removeEnumeratedValue(String enumerationKey,
                                 String code)
                                 throws DoesNotExistException,
                                        InvalidParameterException,
                                        MissingParameterException,
                                        OperationFailedException,
                                        PermissionDeniedException
Removes a value from a particular Enumeration. This particular operation should be used sparingly, as removal of a value may lead to dangling references. It is suggested that standard procedure should be to update the expiration date for the value so that it is seen as expired.

Parameters:
enumerationKey - Identifier for the Enumeration
code - code identifying the value to be removed
Returns:
status of the operation
Throws:
DoesNotExistException - enumerationKey, code not found
InvalidParameterException - invalid enumerationKey, enumeratedValue
MissingParameterException - missing enumerationKey, enumeratedValue
OperationFailedException - unable to complete request
PermissionDeniedException - authorization failure


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.