Interface KrmsTypeRepositoryService
public interface KrmsTypeRepositoryService
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptioncreateKrmsType(KrmsTypeDefinition krmsType) This will create aKrmsTypeDefinitionexactly like the parameter passed in.createTypeTypeRelation(TypeTypeRelation typeTypeRelation) This will create aTypeTypeRelationexactly like the parameter passed in.voiddeleteTypeTypeRelation(String typeTypeRelationId) Delete theTypeTypeRelationwith the given id.findAgendaTypesForAgendaType(String agendaTypeId) find all agenda types for context typefindAgendaTypesForContextType(String contextTypeId) find all agenda types for context typefindAllActionTypesByContextId(String contextId) Returns all action types for the given contextId.find all agenda typesfindAllAgendaTypesByContextId(String contextId) Returns all agenda types for the given contextId.find all context typesfind all Proposition Parameter typesfind all Proposition typesfind all rule typesfindAllRuleTypesByContextId(String contextId) Returns all rule types for the given contextId.Returns all KRMS typesfindAllTypesByNamespace(String namespaceCode) Returns all KRMS types that for a given namespace.findAllTypesByServiceName(String serviceName) Returns all KRMS types that for a given serviceNamefindPropositionParameterTypesForPropositionType(String propositionTypeId) find Proposition Parameter types for the specified proposition typefindPropositionTypesForRuleType(String ruleTypeId) find all Proposition types for the specified rule typefindRuleTypesForAgendaType(String agendaTypeId) find the rule types for the specified agenda typefindTermParameterTypesForTermPropositionParameterType(String termPropositionParameterTypeId) find term parameter types for the given Term based Proposition Parameter typefindTypeTypeRelationsByFromType(String fromTypeId) find type type relations by from typefindTypeTypeRelationsByRelationshipType(RelationshipType relationshipType) find type type relations by relationship typefindTypeTypeRelationsByToType(String toTypeId) find type type relations by To typegetActionTypeByActionTypeIdAndContextId(String actionTypeId, String contextId) Return the action type by actionItemId for the given contextId.getAgendaTypeByAgendaTypeIdAndContextId(String agendaTypeId, String contextId) Return the agenda type by agendaItemId for the given contextId.getAttributeDefinitionById(String attributeDefinitionId) Retrieves an attribute definition for the given id.getAttributeDefinitionByName(String namespaceCode, String name) Retrieves an attribute definition for the given namespace code and name.getRuleTypeByRuleTypeIdAndContextId(String ruleTypeId, String contextId) Return the rule type by ruleItemId for the given contextId.getTypeById(String id) Lookup a krms type based on the given id.getTypeByName(String namespaceCode, String name) Get a krms type object based on name and namespacegetTypeTypeRelation(String typeTypeRelationId) Retrieves a TypeTypeRelation from the repository based on the given id.updateKrmsType(KrmsTypeDefinition krmsType) This will update an existingKrmsTypeDefinitionvoidupdateTypeTypeRelation(TypeTypeRelation typeTypeRelation) This will update an existingTypeTypeRelation.
-
Field Details
-
CONTEXT_SERVICE_NAME
- See Also:
-
AGENDA_SERVICE_NAME
- See Also:
-
RULE_SERVICE_NAME
- See Also:
-
SIMPLE_PROPOSITION_SERVICE_NAME
- See Also:
-
COMPOUND_PROPOSITION_SERVICE_NAME
- See Also:
-
TERM_PROPOSITION_PARAMETER_SERVICE_NAME
- See Also:
-
OPERATOR_PROPOSITION_PARAMETER_SERVICE_NAME
- See Also:
-
CONSTANT_VALUE_PROPOSITION_PARAMETER_SERVICE_NAME
- See Also:
-
FUNCTION_PROPOSITION_PARAMETER_SERVICE_NAME
- See Also:
-
PROPOSITION_SERVICE_NAMES
-
PROPOSITION_PARAMETER_SERVICE_NAMES
-
TERM_PARAMETER_SERVICE_NAME
- See Also:
-
-
Method Details
-
createKrmsType
@CacheEvict(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType", allEntries=true) KrmsTypeDefinition createKrmsType(KrmsTypeDefinition krmsType) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException, org.kuali.rice.core.api.exception.RiceIllegalStateException This will create aKrmsTypeDefinitionexactly like the parameter passed in.- Parameters:
krmsType- - KrmsType- Throws:
IllegalArgumentException- if the krmsType is +IllegalStateException- if the KrmsType already exists in the systemorg.kuali.rice.core.api.exception.RiceIllegalArgumentExceptionorg.kuali.rice.core.api.exception.RiceIllegalStateException
-
updateKrmsType
@CacheEvict(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType", allEntries=true) KrmsTypeDefinition updateKrmsType(KrmsTypeDefinition krmsType) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException, org.kuali.rice.core.api.exception.RiceIllegalStateException This will update an existingKrmsTypeDefinition- Parameters:
krmsType- - KrmsType- Throws:
IllegalArgumentException- if the krmsType is nullIllegalStateException- if the KrmsType does not exist in the systemorg.kuali.rice.core.api.exception.RiceIllegalArgumentExceptionorg.kuali.rice.core.api.exception.RiceIllegalStateException
-
getTypeById
@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType", key="\'id=\' + #p0") KrmsTypeDefinition getTypeById(String id) throws org.kuali.rice.core.api.exception.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:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
getTypeByName
@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType", key="\'namespaceCode=\' + #p0 + \'|\' + \'name=\' + #p1") KrmsTypeDefinition getTypeByName(String namespaceCode, String name) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException, org.kuali.rice.core.api.exception.RiceIllegalStateException Get a krms type object based on name and namespace- Parameters:
namespaceCode- the given type namespacename- 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:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException- if the given namespaceCode or name is a null or blank valueorg.kuali.rice.core.api.exception.RiceIllegalStateException- if multiple krms types exist with the same name and namespace
-
findAllTypesByNamespace
@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType", key="\'allByNamespaceCode=\' + #p0") List<KrmsTypeDefinition> findAllTypesByNamespace(String namespaceCode) throws org.kuali.rice.core.api.exception.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 valueorg.kuali.rice.core.api.exception.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 org.kuali.rice.core.api.exception.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 valueorg.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
getAgendaTypeByAgendaTypeIdAndContextId
@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType", key="\'agendaTypeId=\' + #p0 + \'|\' + \'contextId=\' + #p1") KrmsTypeDefinition getAgendaTypeByAgendaTypeIdAndContextId(String agendaTypeId, String contextId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException Return the agenda type by agendaItemId for the given contextId.- Parameters:
agendaTypeId- the id of the agendaTypecontextId- 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 valueorg.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findAllRuleTypesByContextId
@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType", key="\'{RuleType}contextId=\' + #p0") List<KrmsTypeDefinition> findAllRuleTypesByContextId(String contextId) throws org.kuali.rice.core.api.exception.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 valueorg.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
getRuleTypeByRuleTypeIdAndContextId
@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType", key="\'ruleTypeId=\' + #p0 + \'|\' + \'contextId=\' + #p1") KrmsTypeDefinition getRuleTypeByRuleTypeIdAndContextId(String ruleTypeId, String contextId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException Return the rule type by ruleItemId for the given contextId.- Parameters:
ruleTypeId- the id of the ruleTypecontextId- 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 valueorg.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findAllActionTypesByContextId
@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType", key="\'{ActionType}contextId=\' + #p0") List<KrmsTypeDefinition> findAllActionTypesByContextId(String contextId) throws org.kuali.rice.core.api.exception.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 valueorg.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
getActionTypeByActionTypeIdAndContextId
@Cacheable(value="http://rice.kuali.org/krms/v2_0/KRMSTypeType", key="\'actionTypeId=\' + #p0 + \'|\' + \'contextId=\' + #p1") KrmsTypeDefinition getActionTypeByActionTypeIdAndContextId(String actionTypeId, String contextId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException Return the action type by actionItemId for the given contextId.- Parameters:
actionTypeId- the id of the actionTypecontextId- 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 valueorg.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
getAttributeDefinitionById
@Cacheable(value="http://rice.kuali.org/krms/v2_0/KrmsAttributionDefinitionType", key="\'attributeDefinitionId=\' + #p0") KrmsAttributeDefinition getAttributeDefinitionById(String attributeDefinitionId) throws org.kuali.rice.core.api.exception.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 valueorg.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
getAttributeDefinitionByName
@Cacheable(value="http://rice.kuali.org/krms/v2_0/KrmsAttributionDefinitionType", key="\'namespaceCode=\' + #p0 + \'|\' + \'name=\' + #p1") KrmsAttributeDefinition getAttributeDefinitionByName(String namespaceCode, String name) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException Retrieves an attribute definition for the given namespace code and name.- Parameters:
namespaceCode- the namespace under which to locate the attribute definitionname- 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:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException- if the given namespaceCode or name is a null or blank value
-
createTypeTypeRelation
TypeTypeRelation createTypeTypeRelation(TypeTypeRelation typeTypeRelation) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException This will create aTypeTypeRelationexactly like the parameter passed in.- Parameters:
typeTypeRelation- The TypeTypeRelation to create.- Returns:
- a
TypeTypeRelationexactly like the parameter passed in. - Throws:
IllegalArgumentException- if the TypeTypeRelation is null.IllegalStateException- if the TypeTypeRelation already exists in the system.org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
getTypeTypeRelation
TypeTypeRelation getTypeTypeRelation(String typeTypeRelationId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException Retrieves a TypeTypeRelation from the repository based on the given id.- Parameters:
typeTypeRelationId- to retrieve.- Returns:
- a
TypeTypeRelationidentified by the given id. A null reference is returned if an invalid or non-existent id is supplied. - Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
updateTypeTypeRelation
void updateTypeTypeRelation(TypeTypeRelation typeTypeRelation) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException This will update an existingTypeTypeRelation.- Parameters:
typeTypeRelation- The TypeTypeRelation to update.- Throws:
IllegalArgumentException- if the TypeTypeRelation is null.IllegalStateException- if the TypeTypeRelation does not exists in the system.org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
deleteTypeTypeRelation
void deleteTypeTypeRelation(String typeTypeRelationId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException Delete theTypeTypeRelationwith the given id.- Parameters:
typeTypeRelationId- to delete.- Throws:
IllegalArgumentException- if the TypeTypeRelation is null.IllegalStateException- if the TypeTypeRelation does not exists in the systemorg.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findTypeTypeRelationsByFromType
List<TypeTypeRelation> findTypeTypeRelationsByFromType(String fromTypeId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException find type type relations by from type- Parameters:
fromTypeId- to search on- Returns:
- relations that match the from type
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findTypeTypeRelationsByToType
List<TypeTypeRelation> findTypeTypeRelationsByToType(String toTypeId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException find type type relations by To type- Parameters:
toTypeId- to type to search on- Returns:
- types with that type in the 2nd position in the relationship
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findTypeTypeRelationsByRelationshipType
List<TypeTypeRelation> findTypeTypeRelationsByRelationshipType(RelationshipType relationshipType) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException find type type relations by relationship type- Parameters:
relationshipType- to search on- Returns:
- type type relations given the specified type
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findAllTypesByServiceName
List<KrmsTypeDefinition> findAllTypesByServiceName(String serviceName) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException Returns all KRMS types that for a given serviceName- Returns:
- all KRMS types for a serviceName
- Throws:
IllegalArgumentException- if the given serviceName is a null or blank valueorg.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findAllContextTypes
List<KrmsTypeDefinition> findAllContextTypes() throws org.kuali.rice.core.api.exception.RiceIllegalArgumentExceptionfind all context types- Returns:
- types that are valid for contexts
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findAllAgendaTypes
List<KrmsTypeDefinition> findAllAgendaTypes() throws org.kuali.rice.core.api.exception.RiceIllegalArgumentExceptionfind all agenda types- Returns:
- types that are valid for agendas
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findAgendaTypesForContextType
List<KrmsTypeDefinition> findAgendaTypesForContextType(String contextTypeId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException find all agenda types for context type- Parameters:
contextTypeId- to search on- Returns:
- types that are valid for agendas
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findAgendaTypesForAgendaType
List<KrmsTypeDefinition> findAgendaTypesForAgendaType(String agendaTypeId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException find all agenda types for context type- Parameters:
agendaTypeId- to search on- Returns:
- types that are valid for agendas
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findAllRuleTypes
List<KrmsTypeDefinition> findAllRuleTypes() throws org.kuali.rice.core.api.exception.RiceIllegalArgumentExceptionfind all rule types- Returns:
- types that are valid for rules
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findRuleTypesForAgendaType
List<KrmsTypeDefinition> findRuleTypesForAgendaType(String agendaTypeId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException find the rule types for the specified agenda type- Parameters:
agendaTypeId- to search on- Returns:
- types that are valid for rules
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findAllPropositionTypes
List<KrmsTypeDefinition> findAllPropositionTypes() throws org.kuali.rice.core.api.exception.RiceIllegalArgumentExceptionfind all Proposition types- Returns:
- types that are valid for propositions
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findPropositionTypesForRuleType
List<KrmsTypeDefinition> findPropositionTypesForRuleType(String ruleTypeId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException find all Proposition types for the specified rule type- Parameters:
ruleTypeId- to search on- Returns:
- types that are valid for propositions
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findAllPropositionParameterTypes
List<KrmsTypeDefinition> findAllPropositionParameterTypes() throws org.kuali.rice.core.api.exception.RiceIllegalArgumentExceptionfind all Proposition Parameter types- Returns:
- types that are valid for proposition parameters
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findPropositionParameterTypesForPropositionType
List<KrmsTypeDefinition> findPropositionParameterTypesForPropositionType(String propositionTypeId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException find Proposition Parameter types for the specified proposition type- Parameters:
propositionTypeId- to search on- Returns:
- types that are valid for proposition parameters
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-
findTermParameterTypesForTermPropositionParameterType
List<KrmsTypeDefinition> findTermParameterTypesForTermPropositionParameterType(String termPropositionParameterTypeId) throws org.kuali.rice.core.api.exception.RiceIllegalArgumentException find term parameter types for the given Term based Proposition Parameter type- Parameters:
termPropositionParameterTypeId- to search on- Returns:
- types that are valid as term parameters
- Throws:
org.kuali.rice.core.api.exception.RiceIllegalArgumentException
-