Interface AttributeClassManagement


  • public interface AttributeClassManagement
    Attribute class management API.
    Author:
    K. Benedyczak
    • Method Detail

      • addAttributeClass

        void addAttributeClass​(pl.edu.icm.unity.types.basic.AttributesClass clazz)
                        throws pl.edu.icm.unity.exceptions.EngineException
        Defines a new attribute class
        Parameters:
        clazz -
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • removeAttributeClass

        void removeAttributeClass​(String id)
                           throws pl.edu.icm.unity.exceptions.EngineException
        Removes attribute class
        Parameters:
        id -
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • updateAttributeClass

        void updateAttributeClass​(pl.edu.icm.unity.types.basic.AttributesClass updated)
                           throws pl.edu.icm.unity.exceptions.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:
        pl.edu.icm.unity.exceptions.EngineException
      • getAttributeClasses

        Map<String,​pl.edu.icm.unity.types.basic.AttributesClass> getAttributeClasses()
                                                                                    throws pl.edu.icm.unity.exceptions.EngineException
        Returns:
        all currently defined AttributesClasses, keys are ac names.
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • setEntityAttributeClasses

        void setEntityAttributeClasses​(pl.edu.icm.unity.types.basic.EntityParam entity,
                                       String group,
                                       Collection<String> classes)
                                throws pl.edu.icm.unity.exceptions.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:
        pl.edu.icm.unity.exceptions.EngineException
      • getEntityAttributeClasses

        Collection<pl.edu.icm.unity.types.basic.AttributesClass> getEntityAttributeClasses​(pl.edu.icm.unity.types.basic.EntityParam entity,
                                                                                           String group)
                                                                                    throws pl.edu.icm.unity.exceptions.EngineException
        Attribute classes of a given entity in a group
        Parameters:
        entity -
        group -
        Returns:
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • getAttributeClass

        pl.edu.icm.unity.types.basic.AttributesClass getAttributeClass​(String name)
                                                                throws pl.edu.icm.unity.exceptions.EngineException
        Returns:
        attribute class with given name
        Throws:
        pl.edu.icm.unity.exceptions.EngineException