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(pl.edu.icm.unity.types.basic.AttributeType at)
Adds a new attribute type.pl.edu.icm.unity.types.basic.AttributeType
getAttributeType(java.lang.String name)
java.util.Collection<pl.edu.icm.unity.types.basic.AttributeType>
getAttributeTypes()
java.util.Map<java.lang.String,pl.edu.icm.unity.types.basic.AttributeType>
getAttributeTypesAsMap()
java.lang.String[]
getSupportedAttributeValueTypes()
void
removeAttributeType(java.lang.String id, boolean deleteInstances)
Removes attribute type by id.void
updateAttributeType(pl.edu.icm.unity.types.basic.AttributeType at)
Updates an existing attribute type.
-
-
-
Method Detail
-
getSupportedAttributeValueTypes
java.lang.String[] getSupportedAttributeValueTypes() throws pl.edu.icm.unity.exceptions.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:
pl.edu.icm.unity.exceptions.EngineException
-
addAttributeType
void addAttributeType(pl.edu.icm.unity.types.basic.AttributeType at) throws pl.edu.icm.unity.exceptions.EngineException
Adds a new attribute type.- Parameters:
at
-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
updateAttributeType
void updateAttributeType(pl.edu.icm.unity.types.basic.AttributeType at) throws pl.edu.icm.unity.exceptions.EngineException
Updates an existing attribute type. Fails if the change break constraints of attributes already having this attribute set.- Parameters:
at
-- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
removeAttributeType
void removeAttributeType(java.lang.String id, boolean deleteInstances) throws pl.edu.icm.unity.exceptions.EngineException
Removes attribute type by id.- Parameters:
id
-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:
pl.edu.icm.unity.exceptions.EngineException
-
getAttributeTypes
java.util.Collection<pl.edu.icm.unity.types.basic.AttributeType> getAttributeTypes() throws pl.edu.icm.unity.exceptions.EngineException
- Returns:
- all attribute types
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getAttributeTypesAsMap
java.util.Map<java.lang.String,pl.edu.icm.unity.types.basic.AttributeType> getAttributeTypesAsMap() throws pl.edu.icm.unity.exceptions.EngineException
- Returns:
- all attribute types map with names as keys
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
getAttributeType
pl.edu.icm.unity.types.basic.AttributeType getAttributeType(java.lang.String name) throws pl.edu.icm.unity.exceptions.EngineException
- Parameters:
name
- attribute name- Returns:
- attribute type with a given name
- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
-