org.kuali.rice.krms.api.repository.type
Interface KrmsTypeRepositoryService

All Known Implementing Classes:
KrmsTypeBoServiceImpl

public interface KrmsTypeRepositoryService


Method Summary
 KrmsTypeDefinition createKrmsType(KrmsTypeDefinition krmsType)
          This will create a KrmsTypeDefinition exactly like the parameter passed in.
 List<KrmsTypeDefinition> findAllActionTypesByContextId(String contextId)
          Returns all action types for the given contextId.
 List<KrmsTypeDefinition> findAllAgendaTypesByContextId(String contextId)
          Returns all agenda types for the given contextId.
 List<KrmsTypeDefinition> findAllRuleTypesByContextId(String contextId)
          Returns all rule types for the given contextId.
 List<KrmsTypeDefinition> findAllTypes()
          Returns all KRMS types
 List<KrmsTypeDefinition> findAllTypesByNamespace(String namespaceCode)
          Returns all KRMS types that for a given namespace.
 KrmsTypeDefinition getActionTypeByActionTypeIdAndContextId(String actionTypeId, String contextId)
          Return the action type by actionItemId for the given contextId.
 KrmsTypeDefinition getAgendaTypeByAgendaTypeIdAndContextId(String agendaTypeId, String contextId)
          Return the agenda type by agendaItemId for the given contextId.
 KrmsAttributeDefinition getAttributeDefinitionById(String attributeDefinitionId)
          Retrieves an attribute definition for the given id.
 KrmsAttributeDefinition getAttributeDefinitionByName(String namespaceCode, String name)
          Retrieves an attribute definition for the given namespace code and name.
 KrmsTypeDefinition getRuleTypeByRuleTypeIdAndContextId(String ruleTypeId, String contextId)
          Return the rule type by ruleItemId for the given contextId.
 KrmsTypeDefinition getTypeById(String id)
          Lookup a krms type based on the given id.
 KrmsTypeDefinition getTypeByName(String namespaceCode, String name)
          Get a krms type object based on name and namespace
 KrmsTypeDefinition updateKrmsType(KrmsTypeDefinition krmsType)
          This will update an existing KrmsTypeDefinition
 

Method Detail

createKrmsType

@CacheEvict(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType",
            allEntries=true)
KrmsTypeDefinition createKrmsType(KrmsTypeDefinition krmsType)
                                  throws RiceIllegalArgumentException,
                                         RiceIllegalStateException
This will create a KrmsTypeDefinition exactly like the parameter passed in.

Parameters:
krmsType - - KrmsType
Throws:
IllegalArgumentException - if the krmsType is +
IllegalStateException - if the KrmsType already exists in the system
RiceIllegalArgumentException
RiceIllegalStateException

updateKrmsType

@CacheEvict(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType",
            allEntries=true)
KrmsTypeDefinition updateKrmsType(KrmsTypeDefinition krmsType)
                                  throws RiceIllegalArgumentException,
                                         RiceIllegalStateException
This will update an existing KrmsTypeDefinition

Parameters:
krmsType - - KrmsType
Throws:
IllegalArgumentException - if the krmsType is null
IllegalStateException - if the KrmsType does not exist in the system
RiceIllegalArgumentException
RiceIllegalStateException

getTypeById

@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType",
           key="\'id=\' + #p0")
KrmsTypeDefinition getTypeById(String id)
                               throws RiceIllegalArgumentException
Lookup a krms type based on the given id.

Parameters:
id - the given KRMS type id
Returns:
a KRMS KrmsType object with the given id. A null reference is returned if an invalid or non-existant id is supplied.
Throws:
RiceIllegalArgumentException

getTypeByName

@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType",
           key="\'namespaceCode=\' + #p0 + \'|\' + \'name=\' + #p1")
KrmsTypeDefinition getTypeByName(String namespaceCode,
                                           String name)
                                 throws RiceIllegalArgumentException,
                                        RiceIllegalStateException
Get a krms type object based on name and namespace

Parameters:
namespaceCode - the given type namespace
name - the given type name
Returns:
A krms type object with the given namespace and name if one with that name and namespace exists. Otherwise, null is returned.
Throws:
IllegalArgumentException - if the given namespaceCode or name is a null or blank value
IllegalStateException - if multiple krms types exist with the same name and namespace
RiceIllegalArgumentException
RiceIllegalStateException

findAllTypesByNamespace

@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType",
           key="\'allByNamespaceCode=\' + #p0")
List<KrmsTypeDefinition> findAllTypesByNamespace(String namespaceCode)
                                                 throws RiceIllegalArgumentException
Returns all KRMS types that for a given namespace.

Returns:
all KRMS types for a namespace
Throws:
IllegalArgumentException - if the given namespaceCode is a null or blank value
RiceIllegalArgumentException

findAllTypes

@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType",
           key="\'all\'")
List<KrmsTypeDefinition> findAllTypes()
Returns all KRMS types

Returns:
all KRMS types

findAllAgendaTypesByContextId

@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType",
           key="\'{AgendaType}contextId=\' + #p0")
List<KrmsTypeDefinition> findAllAgendaTypesByContextId(String contextId)
                                                       throws RiceIllegalArgumentException
Returns all agenda types for the given contextId.

Parameters:
contextId - the id of the context
Returns:
all agenda types for the given contextId
Throws:
IllegalArgumentException - if the given contextId is a null or blank value
RiceIllegalArgumentException

getAgendaTypeByAgendaTypeIdAndContextId

@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType",
           key="\'agendaTypeId=\' + #p0 + \'|\' + \'contextId=\' + #p1")
KrmsTypeDefinition getAgendaTypeByAgendaTypeIdAndContextId(String agendaTypeId,
                                                                     String contextId)
                                                           throws RiceIllegalArgumentException
Return the agenda type by agendaItemId for the given contextId.

Parameters:
agendaTypeId - the id of the agendaType
contextId - the id of the context
Returns:
agendaType or null if none is found
Throws:
IllegalArgumentException - if the given agendaTypeId or contextId is a null or blank value
RiceIllegalArgumentException

findAllRuleTypesByContextId

@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType",
           key="\'{RuleType}contextId=\' + #p0")
List<KrmsTypeDefinition> findAllRuleTypesByContextId(String contextId)
                                                     throws RiceIllegalArgumentException
Returns all rule types for the given contextId.

Parameters:
contextId - the id of the context
Returns:
all rule types for the given contextId
Throws:
IllegalArgumentException - if the given contextId is a null or blank value
RiceIllegalArgumentException

getRuleTypeByRuleTypeIdAndContextId

@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType",
           key="\'ruleTypeId=\' + #p0 + \'|\' + \'contextId=\' + #p1")
KrmsTypeDefinition getRuleTypeByRuleTypeIdAndContextId(String ruleTypeId,
                                                                 String contextId)
                                                       throws RiceIllegalArgumentException
Return the rule type by ruleItemId for the given contextId.

Parameters:
ruleTypeId - the id of the ruleType
contextId - the id of the context
Returns:
ruleType or null if none is found
Throws:
IllegalArgumentException - if the given ruleTypeId or contextId is a null or blank value
RiceIllegalArgumentException

findAllActionTypesByContextId

@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType",
           key="\'{ActionType}contextId=\' + #p0")
List<KrmsTypeDefinition> findAllActionTypesByContextId(String contextId)
                                                       throws RiceIllegalArgumentException
Returns all action types for the given contextId.

Parameters:
contextId - the id of the context
Returns:
all action types for the given contextId
Throws:
IllegalArgumentException - if the given contextId is a null or blank value
RiceIllegalArgumentException

getActionTypeByActionTypeIdAndContextId

@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType",
           key="\'actionTypeId=\' + #p0 + \'|\' + \'contextId=\' + #p1")
KrmsTypeDefinition getActionTypeByActionTypeIdAndContextId(String actionTypeId,
                                                                     String contextId)
                                                           throws RiceIllegalArgumentException
Return the action type by actionItemId for the given contextId.

Parameters:
actionTypeId - the id of the actionType
contextId - the id of the context
Returns:
actionType or null if none is found
Throws:
IllegalArgumentException - if the given actionTypeId or contextId is a null or blank value
RiceIllegalArgumentException

getAttributeDefinitionById

@Cacheable(value="http://rice.kuali.org/krms/v2_0/KrmsAttributionDefinitionType",
           key="\'attributeDefinitionId=\' + #p0")
KrmsAttributeDefinition getAttributeDefinitionById(String attributeDefinitionId)
                                                   throws RiceIllegalArgumentException
Retrieves an attribute definition for the given id.

Parameters:
attributeDefinitionId - the id of the attribute definition to retrieve
Returns:
the attribute definition matching the given id, or null if no corresponding attribute definition could be found with the given id value
Throws:
IllegalArgumentException - if the given attributeDefinitionId is a null or blank value
RiceIllegalArgumentException

getAttributeDefinitionByName

@Cacheable(value="http://rice.kuali.org/krms/v2_0/KrmsAttributionDefinitionType",
           key="\'namespaceCode=\' + #p0 + \'|\' + \'name=\' + #p1")
KrmsAttributeDefinition getAttributeDefinitionByName(String namespaceCode,
                                                               String name)
                                                     throws RiceIllegalArgumentException
Retrieves an attribute definition for the given namespace code and name.

Parameters:
namespaceCode - the namespace under which to locate the attribute definition
name - the name of the attribute definition to retrieve
Returns:
the attribute definition matching the give namespace code and name, or null if no corresponding attribute definition could be located
Throws:
RiceIllegalArgumentException - if the given namespaceCode or name is a null or blank value


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