public final class KrmsAttributeDefinitionServiceImpl extends Object implements KrmsAttributeDefinitionService
Constructor and Description |
---|
KrmsAttributeDefinitionServiceImpl() |
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.
|
List<KrmsAttributeDefinition> |
convertListOfBosToImmutables(Collection<KrmsAttributeDefinitionBo> krmsAttributeDefinitionBos)
Converts a List
|
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
|
protected DataObjectService |
getDataObjectService()
This method returns a reference to the dataObjectService.
|
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 |
setDataObjectService(DataObjectService dataObjectService)
Sets the dataObjectService attribute value.
|
void |
updateAttributeDefinition(KrmsAttributeDefinition attributeDefinition)
This will update a
KrmsAttributeDefinition . |
public KrmsAttributeDefinitionServiceImpl()
public Map<String,String> convertAttributeKeys(Map<String,String> attributesByName, String namespace)
KrmsAttributeDefinitionService
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.
convertAttributeKeys
in interface KrmsAttributeDefinitionService
attributesByName
- - a Mapnamespace
- - the namespace code of the set of attributesKrmsAttributeDefinitionService.convertAttributeKeys(java.util.Map, String)
public String getKrmsAttributeId(String attributeName, String namespace)
KrmsAttributeDefinitionService
getKrmsAttributeId
in interface KrmsAttributeDefinitionService
attributeName
- - the name of the attributenamespace
- - the namespace code of the attributeKrmsAttributeDefinitionService.getKrmsAttributeId(String, String)
public KrmsAttributeDefinitionBo getKrmsAttributeBo(String attributeName, String namespace)
KrmsAttributeDefinitionService
getKrmsAttributeBo
in interface KrmsAttributeDefinitionService
attributeName
- - the name of the attributenamespace
- - the namespace code of the attributeKrmsAttributeDefinitionService.getKrmsAttributeBo(String, String)
public KrmsAttributeDefinition createAttributeDefinition(KrmsAttributeDefinition attributeDefinition)
KrmsAttributeDefinitionService
KrmsAttributeDefinition
exactly like the parameter passed in.createAttributeDefinition
in interface KrmsAttributeDefinitionService
attributeDefinition
- - KrmsAttributeDefinitionKrmsAttributeDefinitionService.createAttributeDefinition(org.kuali.rice.krms.api.repository.type.KrmsAttributeDefinition)
public void updateAttributeDefinition(KrmsAttributeDefinition attributeDefinition)
KrmsAttributeDefinitionService
KrmsAttributeDefinition
.updateAttributeDefinition
in interface KrmsAttributeDefinitionService
attributeDefinition
- - KrmsAttributeDefinitionKrmsAttributeDefinitionService.updateAttributeDefinition(org.kuali.rice.krms.api.repository.type.KrmsAttributeDefinition)
public KrmsAttributeDefinition getAttributeDefinitionById(String id)
KrmsAttributeDefinitionService
getAttributeDefinitionById
in interface KrmsAttributeDefinitionService
id
- the given KrmsAttributeDefinition idKrmsAttributeDefinitionService.getAttributeDefinitionById(String)
public KrmsAttributeDefinition getAttributeDefinitionByNameAndNamespace(String name, String namespace)
KrmsAttributeDefinitionService
getAttributeDefinitionByNameAndNamespace
in interface KrmsAttributeDefinitionService
name
- the given namenamespace
- the given type namespaceKrmsAttributeDefinitionService.getAttributeDefinitionByNameAndNamespace(String, String)
public List<KrmsAttributeDefinition> findAttributeDefinitionsByNamespace(String namespace)
KrmsAttributeDefinitionService
findAttributeDefinitionsByNamespace
in interface KrmsAttributeDefinitionService
KrmsAttributeDefinitionService.findAttributeDefinitionsByNamespace(String)
public List<KrmsAttributeDefinition> findAttributeDefinitionsByType(String typeId)
KrmsAttributeDefinitionService
findAttributeDefinitionsByType
in interface KrmsAttributeDefinitionService
public List<KrmsAttributeDefinition> findAllAttributeDefinitions()
KrmsAttributeDefinitionService
findAllAttributeDefinitions
in interface KrmsAttributeDefinitionService
KrmsAttributeDefinitionService.findAllAttributeDefinitions()
public List<KrmsAttributeDefinition> convertListOfBosToImmutables(Collection<KrmsAttributeDefinitionBo> krmsAttributeDefinitionBos)
krmsAttributeDefinitionBos
- a mutable Listpublic void setDataObjectService(DataObjectService dataObjectService)
dataObjectService
- The dataObjectService to set.protected DataObjectService getDataObjectService()
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.