public interface KrmsAttributeDefinitionService
Modifier and Type | Method and Description |
---|---|
Map<String,String> |
convertAttributeKeys(Map<String,String> attributesByName,
String namespace)
This method converts a collection of name/value attribute pairs to
id/value attribute pairs.
|
KrmsAttributeDefinition |
createAttributeDefinition(KrmsAttributeDefinition attributeDefinition)
This will create a
KrmsAttributeDefinition exactly like the parameter passed in. |
List<KrmsAttributeDefinition> |
findAllAttributeDefinitions()
Returns all KrmsAttributeDefinitions
|
List<KrmsAttributeDefinition> |
findAttributeDefinitionsByNamespace(String namespace)
Returns all KrmsAttributeDefinition that for a given namespace.
|
List<KrmsAttributeDefinition> |
findAttributeDefinitionsByType(String typeId)
Returns all KrmsAttributeDefinition that for a given type.
|
KrmsAttributeDefinition |
getAttributeDefinitionById(String id)
Lookup a KrmsAttributeDefinition based on the given id.
|
KrmsAttributeDefinition |
getAttributeDefinitionByNameAndNamespace(String name,
String namespace)
Get a KrmsAttributeDefinition object based on name and namespace
|
org.kuali.rice.krms.impl.repository.KrmsAttributeDefinitionBo |
getKrmsAttributeBo(String attributeName,
String namespace)
This method gets a KrmsAttributeDefinitionBo object for a given attribute.
|
String |
getKrmsAttributeId(String attributeName,
String namespace)
This method gets the attribute definition ID for a given attribute
|
void |
updateAttributeDefinition(KrmsAttributeDefinition attributeDefinition)
This will update a
KrmsAttributeDefinition . |
@CacheEvict(value="http://rice.kuali.org/krms/v2_0/KrmsAttributionDefinitionType", allEntries=true) KrmsAttributeDefinition createAttributeDefinition(KrmsAttributeDefinition attributeDefinition)
KrmsAttributeDefinition
exactly like the parameter passed in.attributeDefinition
- - KrmsAttributeDefinitionIllegalArgumentException
- if the attribute definition is nullIllegalStateException
- if the attribute definition already exists in the system@CacheEvict(value="http://rice.kuali.org/krms/v2_0/KrmsAttributionDefinitionType", allEntries=true) void updateAttributeDefinition(KrmsAttributeDefinition attributeDefinition)
KrmsAttributeDefinition
.attributeDefinition
- - KrmsAttributeDefinitionIllegalArgumentException
- if the attribute definition is nullIllegalStateException
- if the attribute definition does not exist in the system@Cacheable(value="http://rice.kuali.org/krms/v2_0/KrmsAttributionDefinitionType", key="\'attributeDefinitionId=\' + #p0") KrmsAttributeDefinition getAttributeDefinitionById(String id)
id
- the given KrmsAttributeDefinition id@Cacheable(value="http://rice.kuali.org/krms/v2_0/KrmsAttributionDefinitionType", key="\'namespaceCode=\' + #p0 + \'|\' + \'name=\' + #p1") KrmsAttributeDefinition getAttributeDefinitionByNameAndNamespace(String name, String namespace)
name
- the given namenamespace
- the given type namespaceIllegalStateException
- if multiple KrmsAttributeDefinitions exist with the same name and namespace@Cacheable(value="http://rice.kuali.org/krms/v2_0/KrmsAttributionDefinitionType", key="\'namespace=\' + #p0") List<KrmsAttributeDefinition> findAttributeDefinitionsByNamespace(String namespace)
@Cacheable(value="http://rice.kuali.org/krms/v2_0/KrmsAttributionDefinitionType", key="\'typeId=\' + #p0") List<KrmsAttributeDefinition> findAttributeDefinitionsByType(String typeId)
@Cacheable(value="http://rice.kuali.org/krms/v2_0/KrmsAttributionDefinitionType", key="\'all\'") List<KrmsAttributeDefinition> findAllAttributeDefinitions()
Map<String,String> convertAttributeKeys(Map<String,String> attributesByName, String namespace)
At the api layer, attributes are represented as name/value pairs. However, in the database, the names of the attribute and the values are stored separately. The attribute definitions contain the attribute names. All defined attributes(for the various krms entity types) are stored together in a single table. The attribute values themselves are stored in separate tables for each entity type, and then reference the attribute definitions by the attribute definition id.
This method converts the name/value pairs to id/value pairs so they can be searched from a single table. This simplifies the queries for attributes.
attributesByName
- - a Mapnamespace
- - the namespace code of the set of attributes@Cacheable(value="http://rice.kuali.org/krms/v2_0/KrmsAttributionDefinitionType", key="\'{ID}namespaceCode=\' + #p0 + \'|\' + \'name=\' + #p1") String getKrmsAttributeId(String attributeName, String namespace)
attributeName
- - the name of the attributenamespace
- - the namespace code of the attributeorg.kuali.rice.krms.impl.repository.KrmsAttributeDefinitionBo getKrmsAttributeBo(String attributeName, String namespace)
attributeName
- - the name of the attributenamespace
- - the namespace code of the attributeCopyright © 2005–2015 The Kuali Foundation. All rights reserved.