Package pl.edu.icm.unity.engine.api
Interface AttributeTypeManagement
-
public interface AttributeTypeManagement
Attribute types management API.- Author:
- K. Benedyczak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAttributeType(AttributeType at)
Adds a new attribute type.AttributeType
getAttributeType(String name)
Collection<AttributeType>
getAttributeTypes()
Map<String,AttributeType>
getAttributeTypesAsMap()
String[]
getSupportedAttributeValueTypes()
void
removeAttributeType(String id, boolean deleteInstances)
Removes attribute type by id.void
updateAttributeType(AttributeType at)
Updates an existing attribute type.
-
-
-
Method Detail
-
getSupportedAttributeValueTypes
String[] getSupportedAttributeValueTypes() throws EngineException
- Returns:
- identifiers of all attribute value types which are supported by server. The list is constant for the lifetime of the server as is constructed from the available implementations.
- Throws:
EngineException
-
addAttributeType
void addAttributeType(AttributeType at) throws EngineException
Adds a new attribute type.- Throws:
EngineException
-
updateAttributeType
void updateAttributeType(AttributeType at) throws EngineException
Updates an existing attribute type. Fails if the change break constraints of attributes already having this attribute set.- Throws:
EngineException
-
removeAttributeType
void removeAttributeType(String id, boolean deleteInstances) throws EngineException
Removes attribute type by id.- Parameters:
deleteInstances
- if false then operation will succeed only if no attributes of this type are defined. If true then also all instances of this type are removed.- Throws:
EngineException
-
getAttributeTypes
Collection<AttributeType> getAttributeTypes() throws EngineException
- Returns:
- all attribute types
- Throws:
EngineException
-
getAttributeTypesAsMap
Map<String,AttributeType> getAttributeTypesAsMap() throws EngineException
- Returns:
- all attribute types map with names as keys
- Throws:
EngineException
-
getAttributeType
AttributeType getAttributeType(String name) throws EngineException
- Parameters:
name
- attribute name- Returns:
- attribute type with a given name
- Throws:
EngineException
-
-