Interface AttributeTypeManagement


  • public interface AttributeTypeManagement
    Attribute types management API.
    Author:
    K. Benedyczak
    • Method Detail

      • getSupportedAttributeValueTypes

        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.
        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.
        Throws:
        pl.edu.icm.unity.exceptions.EngineException
      • removeAttributeType

        void removeAttributeType​(String id,
                                 boolean deleteInstances)
                          throws pl.edu.icm.unity.exceptions.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:
        pl.edu.icm.unity.exceptions.EngineException
      • getAttributeTypes

        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

        Map<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​(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