Package pl.edu.icm.unity.engine.api
Interface AttributeClassManagement
-
public interface AttributeClassManagement
Attribute class management API.- Author:
- K. Benedyczak
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
addAttributeClass(AttributesClass clazz)
Defines a new attribute classAttributesClass
getAttributeClass(String name)
Map<String,AttributesClass>
getAttributeClasses()
Collection<AttributesClass>
getEntityAttributeClasses(EntityParam entity, String group)
Attribute classes of a given entity in a groupvoid
removeAttributeClass(String id)
Removes attribute classvoid
setEntityAttributeClasses(EntityParam entity, String group, Collection<String> classes)
Updates the set of entity's attribute classes in a given group.void
updateAttributeClass(AttributesClass updated)
Updates an attribute class.
-
-
-
Method Detail
-
addAttributeClass
void addAttributeClass(AttributesClass clazz) throws EngineException
Defines a new attribute class- Parameters:
clazz
-- Throws:
EngineException
-
removeAttributeClass
void removeAttributeClass(String id) throws EngineException
Removes attribute class- Parameters:
id
-- Throws:
EngineException
-
updateAttributeClass
void updateAttributeClass(AttributesClass updated) throws EngineException
Updates an attribute class. The update operation will be successful only if all entities with this class fulfill the updated class rules.- Parameters:
updated
- the updated class. Existing class to be updated is matched by name.- Throws:
EngineException
-
getAttributeClasses
Map<String,AttributesClass> getAttributeClasses() throws EngineException
- Returns:
- all currently defined
AttributesClass
es, keys are ac names. - Throws:
EngineException
-
setEntityAttributeClasses
void setEntityAttributeClasses(EntityParam entity, String group, Collection<String> classes) throws EngineException
Updates the set of entity's attribute classes in a given group. The entity must have all the requires attributes set and must not have any disallowed attributes, otherwise the operation will fail.- Parameters:
entity
-classes
-- Throws:
EngineException
-
getEntityAttributeClasses
Collection<AttributesClass> getEntityAttributeClasses(EntityParam entity, String group) throws EngineException
Attribute classes of a given entity in a group- Parameters:
entity
-group
-- Returns:
- Throws:
EngineException
-
getAttributeClass
AttributesClass getAttributeClass(String name) throws EngineException
- Returns:
- attribute class with given name
- Throws:
EngineException
-
-