|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface KrmsAttributeDefinitionService
Method Summary | |
---|---|
void |
clearCache()
This method clears the cache of AttributeDefinitionBo objects. |
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. |
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 . |
Method Detail |
---|
KrmsAttributeDefinition createAttributeDefinition(KrmsAttributeDefinition attributeDefinition)
KrmsAttributeDefinition
exactly like the parameter passed in.
attributeDefinition
- - KrmsAttributeDefinition
IllegalArgumentException
- if the attribute definition is null
IllegalStateException
- if the attribute definition already exists in the systemvoid updateAttributeDefinition(KrmsAttributeDefinition attributeDefinition)
KrmsAttributeDefinition
.
attributeDefinition
- - KrmsAttributeDefinition
IllegalArgumentException
- if the attribute definition is null
IllegalStateException
- if the attribute definition does not exist in the systemKrmsAttributeDefinition getAttributeDefinitionById(String id)
id
- the given KrmsAttributeDefinition id
KrmsAttributeDefinition getAttributeDefinitionByNameAndNamespace(String name, String namespace)
name
- the given namenamespace
- the given type namespace
IllegalStateException
- if multiple KrmsAttributeDefinitions exist with the same name and namespaceList<KrmsAttributeDefinition> findAttributeDefinitionsByNamespace(String namespace)
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
String getKrmsAttributeId(String attributeName, String namespace)
attributeName
- - the name of the attributenamespace
- - the namespace code of the attribute
org.kuali.rice.krms.impl.repository.KrmsAttributeDefinitionBo getKrmsAttributeBo(String attributeName, String namespace)
attributeName
- - the name of the attributenamespace
- - the namespace code of the attribute
void clearCache()
Since searching for attribute definitions is a common operation, the attribute definitions fetched from the database are cached to improve performance.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |