Interface AttributesManagement


  • public interface AttributesManagement
    Attributes management API.
    Author:
    K. Benedyczak
    • Method Detail

      • createAttribute

        void createAttribute​(EntityParam entity,
                             Attribute attribute)
                      throws EngineException
        Creates an attribute (must not be present). Confirmation will be sent if needed for attribute.
        Parameters:
        entity -
        attribute -
        update -
        Throws:
        EngineException
      • setAttribute

        void setAttribute​(EntityParam entity,
                          Attribute attribute)
                   throws EngineException
        Updates or creates an attribute (may be present). Confirmation will be sent if needed for attribute.
        Parameters:
        entity -
        attribute -
        update -
        Throws:
        EngineException
      • createAttributeSuppressingConfirmation

        void createAttributeSuppressingConfirmation​(EntityParam entity,
                                                    Attribute attribute)
                                             throws EngineException
        Creates an attribute (must not be present). Confirmation will not be sent.
        Parameters:
        entity -
        attribute -
        update -
        Throws:
        EngineException
      • setAttributeSuppressingConfirmation

        void setAttributeSuppressingConfirmation​(EntityParam entity,
                                                 Attribute attribute)
                                          throws EngineException
        Updates or creates an attribute (may be present). Confirmation will not be sent.
        Parameters:
        entity -
        attribute -
        update -
        Throws:
        EngineException
      • getAttributes

        Collection<AttributeExt> getAttributes​(EntityParam entity,
                                               String groupPath,
                                               String attributeTypeId)
                                        throws EngineException
        Returns visible attributes of an entity. The two last arguments can be null, meaning that there is no restriction. The security sensitive attributes are not included.
        Parameters:
        entity -
        groupPath -
        attributeTypeId -
        Returns:
        Throws:
        EngineException
      • getAllAttributes

        Collection<AttributeExt> getAllAttributes​(EntityParam entity,
                                                  boolean effective,
                                                  String groupPath,
                                                  String attributeTypeId,
                                                  boolean allowDegrade)
                                           throws EngineException
        Returns attributes of an entity, including hidden ones. The two last arguments can be null, meaning that there is no restriction.
        Parameters:
        entity -
        effective - if false then attributes which are added by groups' attribute statements are not included. Useful only for attribute management interfaces.
        groupPath -
        attributeTypeId -
        allowDegrade - if true then in case that the caller has no permission to read hidden attributes, the method will degrade itself and will try to return only the visible attributes, what requires smaller permissions. Note that still it may cause authz error.
        Returns:
        Throws:
        EngineException