Package pl.edu.icm.unity.engine.api
Interface AttributeTypeManagement
-
public interface AttributeTypeManagementAttribute types management API.- Author:
- K. Benedyczak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAttributeType(pl.edu.icm.unity.types.basic.AttributeType at)Adds a new attribute type.pl.edu.icm.unity.types.basic.AttributeTypegetAttributeType(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()voidremoveAttributeType(java.lang.String id, boolean deleteInstances)Removes attribute type by id.voidupdateAttributeType(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.EngineExceptionAdds a new attribute type.- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
updateAttributeType
void updateAttributeType(pl.edu.icm.unity.types.basic.AttributeType at) throws pl.edu.icm.unity.exceptions.EngineExceptionUpdates an existing attribute type. Fails if the change break constraints of attributes already having this attribute set.- Throws:
pl.edu.icm.unity.exceptions.EngineException
-
removeAttributeType
void removeAttributeType(java.lang.String id, boolean deleteInstances) throws pl.edu.icm.unity.exceptions.EngineExceptionRemoves 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:
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
-
-