Interface AttributesManagerImplApi

All Known Implementing Classes:
AttributesManagerImpl

public interface AttributesManagerImplApi
Author:
Michal Prochazka <michalp@ics.muni.cz>, Slavek Licehammer <glory@ics.muni.cz>
  • Method Details

    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Facility facility)
      Get all non-empty attributes associated with the facility.
      Parameters:
      sess - perun session
      facility - facility to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Facility facility, List<String> attrNames)
      Get all attributes associated with the facility which have name in list attrNames (empty too). Virtual attribute too.
      Parameters:
      sess - perun session
      facility - to get the attributes from
      attrNames - list of attributes' names
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getVirtualAttributes

      List<Attribute> getVirtualAttributes(PerunSession sess, Facility facility)
      Get all virtual attributes associated with the facility.
      Parameters:
      sess - perun session
      facility - to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getVirtualAttributes

      List<Attribute> getVirtualAttributes(PerunSession sess, Member member)
      Get all virtual attributes associated with the member.
      Parameters:
      sess - perun session
      member - to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getVirtualAttributes

      List<Attribute> getVirtualAttributes(PerunSession sess, Vo vo)
      Get all virtual attributes associated with the vo.
      Parameters:
      sess - perun session
      vo - to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getVirtualAttributes

      List<Attribute> getVirtualAttributes(PerunSession sess, Group group)
      Get all virtual attributes associated with the group.
      Parameters:
      sess - perun session
      group - to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getVirtualAttributes

      List<Attribute> getVirtualAttributes(PerunSession sess, Host host)
      Get all virtual attributes associated with the host.
      Parameters:
      sess - perun session
      host - to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Vo vo)
      Get all non-empty attributes associated with the vo.
      Parameters:
      sess - perun session
      vo - vo to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Group group)
      Get all non-empty attributes associated with the group.
      Parameters:
      sess - perun session
      group - group to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Resource resource)
      Get all non-empty attributes associated with the resource.
      Parameters:
      sess - perun session
      resource - resource to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getVirtualAttributes

      List<Attribute> getVirtualAttributes(PerunSession sess, Resource resource)
      Get all virtual attributes associated with the resource.
      Parameters:
      sess - perun session
      resource - to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Member member, Resource resource)
      Get all non-empty attributes associated with the member on the resource.
      Parameters:
      sess - perun session
      member - to get the attributes from
      resource - to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getVirtualAttributes

      List<Attribute> getVirtualAttributes(PerunSession sess, Member member, Resource resource)
      Get all virtual attributes associated with the member on the resource.
      Parameters:
      sess - perun session
      member - to get the attributes from
      resource - to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Member member, Group group)
      Get all non-empty, non-virtual attributes associated with the member in the group.
      Parameters:
      sess - perun session
      member - to get the attributes from
      group - group to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Member member, Group group, List<String> attrNames)
      Get all attributes (empty and virtual too) associated with the member in the group which have name in list attrNames.
      Parameters:
      sess - perun session
      member - to get the attributes from
      group - group to get the attributes from
      attrNames - list of attributes' names
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Member member, Resource resource, List<String> attrNames)
      Get all attributes (empty and virtual too) associated with the member on the resource which have name in list attrNames.
      Parameters:
      sess - perun session
      member - to get the attributes from
      resource - resource to get the attributes from
      attrNames - list of attributes' names
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Resource resource, Group group, List<String> attrNames)
      Get all attributes (empty and virtual too) associated with the group on the resource which have name in list attrNames.
      Parameters:
      sess - perun session
      resource - to get the attributes for
      group - to get the attributes for
      attrNames - list of attributes names
      Returns:
      list of selected attributes for group and resource objects
      Throws:
      InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, User user, Facility facility, List<String> attrNames)
      Get all attributes (empty and virtual too) associated with the user on the facility which have name in list attrNames.
      Parameters:
      sess - perun session
      user - to get the attributes from
      facility - facility to get the attributes from
      attrNames - list of attributes' names
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Member member)
      Get all non-empty attributes associated with the member.
      Parameters:
      sess - perun session
      member - member to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAllAttributesStartWithNameWithoutNullValue

      List<Attribute> getAllAttributesStartWithNameWithoutNullValue(PerunSession sess, Group group, String startPartOfName)
      Get all non-empty attributes associated with the group starts with name startPartOfName. Get only nonvirtual attributes with NotNull value. PRIVILEGE: Get only those attributes the principal has access to.
      Parameters:
      sess - perun session
      group - to get the attributes from
      startPartOfName - attribute name start with this part
      Returns:
      list of attributes which name start with startPartOfName
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAllAttributesStartWithNameWithoutNullValue

      List<Attribute> getAllAttributesStartWithNameWithoutNullValue(PerunSession sess, Resource resource, String startPartOfName)
      Get all non-empty attributes associated with the resource starts with name startPartOfName. Get only nonvirtual attributes with notNull value. PRIVILEGE: Get only those attributes the principal has access to.
      Parameters:
      sess - perun session
      resource - to get the attributes from
      startPartOfName - attribute name start with this part
      Returns:
      list of attributes which name start with startPartOfName
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Vo vo, List<String> attrNames)
      Get all attributes associated with the vo which have name in list attrNames (empty and virtual too).
      Parameters:
      sess - perun session
      vo - to get the attributes from
      attrNames - list of attributes' names
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Member member, List<String> attrNames)
      Get all attributes associated with the member which have name in list attrNames (empty and virtual too).
      Parameters:
      sess - perun session
      member - to get the attributes from
      attrNames - list of attributes' names
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Group group, List<String> attrNames)
      Get all attributes associated with the group which have name in list attrNames (empty too).
      Parameters:
      sess - perun session
      group - to get the attributes from
      attrNames - list of attributes' names
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raises in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Resource resource, List<String> attrNames)
      Get all attributes associated with the resource which have name in list attrNames (empty too).
      Parameters:
      sess - perun session
      resource - to get the attributes from
      attrNames - list of attributes' names
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raises in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, UserExtSource ues, List<String> attrNames)
      Get all attributes associated with the UserExtSource which have name in list attrNames (empty and virtual too).
      Parameters:
      sess - perun session
      ues - to get the attributes from
      attrNames - list of attributes' names
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Facility facility, User user)
      Get all non-empty attributes associated with the user on the facility.
      Parameters:
      sess - perun session
      facility -
      user -
      Returns:
      list of attributes
      Throws:
      InternalErrorException
    • getUserFacilityAttributesForAnyUser

      List<Attribute> getUserFacilityAttributesForAnyUser(PerunSession sess, Facility facility)
      Get all non-empty attributes associated with any user on the facility.
      Parameters:
      sess - perun session
      facility -
      Returns:
      list of attributes
      Throws:
      InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, String key)
      Get all entiteless attributes with subject equaled String key
      Parameters:
      sess -
      key -
      Returns:
      Throws:
      InternalErrorException
    • getEntitylessAttributes

      List<Attribute> getEntitylessAttributes(PerunSession sess, String attrName)
      Get all entityless attributes with attributeName
      Parameters:
      sess - perun session
      attrName -
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getEntitylessAttrValueForUpdate

      String getEntitylessAttrValueForUpdate(PerunSession sess, int attrId, String key) throws AttributeNotExistsException
      Return value of entityless attribute by attr_id and key (subject). Value is in the format from DB. IMPORTANT: return only values in String (special format for Map or List)! If value is null, return null. If attribute with subject=key not exists, create new one with null value and return null.
      Parameters:
      sess -
      attrId -
      key -
      Returns:
      attr_value in string
      Throws:
      InternalErrorException - if runtime error exception has been thrown
      AttributeNotExistsException - throw exception if attribute with value not exists in DB
    • getEntitylessKeys

      List<String> getEntitylessKeys(PerunSession sess, AttributeDefinition attributeDefinition)
      Returns list of Keys which fits the attributeDefinition.
      Parameters:
      sess -
      attributeDefinition -
      Returns:
      Throws:
      InternalErrorException
    • getAttributesByAttributeDefinition

      List<Attribute> getAttributesByAttributeDefinition(PerunSession sess, AttributeDefinition attributeDefinition)
      Returns all attributes with not-null value which fits the attributeDefinition. Can't process core or virtual attributes.
      Parameters:
      sess -
      attributeDefinition -
      Returns:
      list of attributes
      Throws:
      InternalErrorException
    • getVirtualAttributes

      List<Attribute> getVirtualAttributes(PerunSession sess, Facility facility, User user)
      Get all virtual attributes associated with the user on the facility.
      Parameters:
      sess - perun session
      facility - to get the attributes from
      user - to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getVirtualAttributes

      List<Attribute> getVirtualAttributes(PerunSession sess, Member member, Group group)
      Get all virtual attributes associated with the member in the group.
      Parameters:
      sess - perun session
      member - to get the attributes from
      group - to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, User user)
      Get all non-empty attributes associated with the user.
      Parameters:
      sess - perun session
      user -
      Returns:
      list of attributes
      Throws:
      InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, User user, List<String> attrNames)
      Get all attributes associated with the user which have name in list attrNames (empty and virtual too).
      Parameters:
      sess - perun session
      user - to get the attributes from
      attrNames - list of attributes' names
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getVirtualAttributes

      List<Attribute> getVirtualAttributes(PerunSession sess, User user)
      Get all virtual attributes associated with the user.
      Parameters:
      sess - perun session
      user - to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getVirtualAttributes

      List<Attribute> getVirtualAttributes(PerunSession sess, UserExtSource ues)
      Get all virtual attributes associated with the UserExtSource.
      Parameters:
      sess - perun session
      ues - to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Host host)
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Host host, List<String> attrNames)
      Get all attributes associated with the host which have name in list attrNames (empty and virtual too). Empty list attrNames will return no attributes.
      Parameters:
      sess - perun session
      host - host to get attributes for
      attrNames - list of attributes' names
      Returns:
      list of attributes
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, Resource resource, Group group)
    • getAttributes

      List<Attribute> getAttributes(PerunSession sess, UserExtSource ues)
      Get all non-empty attributes associated with the UserExtSource.
      Parameters:
      sess - perun session
      ues - to get the attributes from
      Returns:
      list of attributes
      Throws:
      InternalErrorException
    • getAllUserFacilityRichAttributes

      List<RichAttribute<User,Facility>> getAllUserFacilityRichAttributes(PerunSession sess, User user)
      Get all non-empty attributes associated with the user on the all facilities. This method doesn't use cache.
      Parameters:
      sess - perun session
      user -
      Returns:
      list of attributes
      Throws:
      InternalErrorException
    • getAttribute

      Attribute getAttribute(PerunSession sess, Facility facility, String attributeName) throws AttributeNotExistsException
      Get particular attribute for the facility.
      Parameters:
      attributeName - attribute name defined in the particular manager
      facility - to get attribute from
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttribute

      Attribute getAttribute(PerunSession sess, Vo vo, String attributeName) throws AttributeNotExistsException
      Get particular attribute for the vo.
      Parameters:
      attributeName - attribute name defined in the particular manager
      vo - to get attribute from
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttribute

      Attribute getAttribute(PerunSession sess, Group group, String attributeName) throws AttributeNotExistsException
      Get particular attribute for the group.
      Parameters:
      attributeName - attribute name defined in the particular manager
      group - to get attribute from
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttribute

      Attribute getAttribute(PerunSession sess, Resource resource, String attributeName) throws AttributeNotExistsException
      Get particular attribute for the resource.
      Parameters:
      attributeName - attribute name defined in the particular manager
      resource - to get attribute from
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttribute

      Attribute getAttribute(PerunSession sess, Member member, Resource resource, String attributeName) throws AttributeNotExistsException
      Get particular attribute for the member on this resource.
      Parameters:
      member - to get attribute from
      resource - to get attribute from
      attributeName - attribute name defined in the particular manager
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttribute

      Attribute getAttribute(PerunSession sess, Member member, Group group, String attributeName) throws AttributeNotExistsException
      Get particular attribute for the member in this group.
      Parameters:
      sess - perun session
      member - to get attribute from
      group - to get attribute from
      attributeName - attribute name defined in the particular manager
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlying data source
    • getAttribute

      Attribute getAttribute(PerunSession sess, Member member, String attributeName) throws AttributeNotExistsException
      Get particular attribute for the member.
      Parameters:
      attributeName - attribute name defined in the particular manager
      member - to get attribute from
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttribute

      Attribute getAttribute(PerunSession sess, Facility facility, User user, String attributeName) throws AttributeNotExistsException
      Get particular attribute for the user on this facility.
      Parameters:
      attributeName - attribute name defined in the particular manager
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttribute

      Attribute getAttribute(PerunSession sess, User user, String attributeName) throws AttributeNotExistsException
      Get particular attribute for the user.
      Parameters:
      sess -
      user -
      attributeName - attribute name defined in the particular manager
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getUserAttrValueForUpdate

      String getUserAttrValueForUpdate(PerunSession sess, int attrId, int userId) throws AttributeNotExistsException
      Get particular attribute for the user for update - locking the attribute for user.
      Parameters:
      sess -
      attrId -
      userId -
      Returns:
      attribute value
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlying data source
    • getAttribute

      Attribute getAttribute(PerunSession sess, Host host, String attributeName) throws AttributeNotExistsException
      Throws:
      AttributeNotExistsException
    • getAttribute

      Attribute getAttribute(PerunSession sess, Resource resource, Group group, String attributeName) throws AttributeNotExistsException
      Throws:
      AttributeNotExistsException
    • getAttribute

      Attribute getAttribute(PerunSession sess, String key, String attributeName) throws AttributeNotExistsException
      Get particular entityless attribute
      Parameters:
      sess - perun session
      key - key to get attribute for
      attributeName -
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getEntitylessStringAttributeMapping

      Map<String,String> getEntitylessStringAttributeMapping(PerunSession sess, String attributeName) throws AttributeNotExistsException
      Gets map from keys to string values for an entityless attribute.
      Parameters:
      sess - not used
      attributeName - full attribute name
      Returns:
      unordered hashmap
      Throws:
      AttributeNotExistsException
    • getAttribute

      Attribute getAttribute(PerunSession sess, UserExtSource ues, String attributeName) throws AttributeNotExistsException
      Get particular attribute for the User External Source.
      Parameters:
      sess -
      ues -
      attributeName - attribute name defined in the particular manager
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttributeDefinition

      AttributeDefinition getAttributeDefinition(PerunSession sess, String attributeName) throws AttributeNotExistsException
      Get attributes definition (attribute without defined value).
      Parameters:
      attributeName - attribute name defined in the particular manager
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttributesDefinition

      List<AttributeDefinition> getAttributesDefinition(PerunSession sess)
      Get attributes definition (attribute without defined value).
      Returns:
      List of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributesDefinitionByNamespace

      List<AttributeDefinition> getAttributesDefinitionByNamespace(PerunSession sess, String namespace)
      Get attributes definition (attribute without defined value) with specified namespace.
      Parameters:
      namespace - get only attributes with this namespace
      Returns:
      List of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getAttributeDefinitionById

      AttributeDefinition getAttributeDefinitionById(PerunSession sess, int id) throws AttributeNotExistsException
      Get attibute definition (attribute without defined value).
      Parameters:
      id - attribute id
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttributeById

      Attribute getAttributeById(PerunSession sess, Facility facility, int id) throws AttributeNotExistsException
      Get particular attribute for the facility.
      Parameters:
      id - attribute id
      facility - to get attribute from
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttributeById

      Attribute getAttributeById(PerunSession sess, Vo vo, int id) throws AttributeNotExistsException
      Get particular attribute for the vo.
      Parameters:
      id - attribute id
      vo - to get attribute from
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttributeById

      Attribute getAttributeById(PerunSession sess, Resource resource, int id) throws AttributeNotExistsException
      Get particular attribute for the resource.
      Parameters:
      id - attribute id
      resource - to get attribute from
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttributeById

      Attribute getAttributeById(PerunSession sess, Member member, Resource resource, int id) throws AttributeNotExistsException
      Get particular attribute for the member on this resource.
      Parameters:
      member - to get attribute from
      resource - to get attribute from
      id - attribute id
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttributeById

      Attribute getAttributeById(PerunSession sess, Member member, Group group, int id) throws AttributeNotExistsException
      Get particular attribute for the member in this group.
      Parameters:
      sess - perun session
      member - to get attribute from
      group - to get attribute from
      id - attribute id
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlying data source
    • getAttributeById

      Attribute getAttributeById(PerunSession sess, Member member, int id) throws AttributeNotExistsException
      Get particular attribute for the member.
      Parameters:
      sess -
      member -
      id - attribute id
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttributeById

      Attribute getAttributeById(PerunSession sess, Facility facility, User user, int id) throws AttributeNotExistsException
      Get particular attribute for the user on this facility.
      Parameters:
      sess -
      facility -
      user -
      id - attribute id
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttributeById

      Attribute getAttributeById(PerunSession sess, User user, int id) throws AttributeNotExistsException
      Get particular attribute for the user.
      Parameters:
      sess -
      user -
      id - attribute id
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • getAttributeById

      Attribute getAttributeById(PerunSession sess, Host host, int id) throws AttributeNotExistsException
      Throws:
      AttributeNotExistsException
    • getAttributeById

      Attribute getAttributeById(PerunSession sess, Resource resource, Group group, int id) throws AttributeNotExistsException
      Throws:
      AttributeNotExistsException
    • getAttributeById

      Attribute getAttributeById(PerunSession sess, Group group, int id) throws AttributeNotExistsException
      Throws:
      AttributeNotExistsException
    • getAttributeById

      Attribute getAttributeById(PerunSession sess, UserExtSource ues, int id) throws AttributeNotExistsException
      Get particular attribute for the user external source.
      Parameters:
      sess -
      ues -
      id - attribute id
      Returns:
      attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AttributeNotExistsException - if the attribute doesn't exists in the underlaying data source
    • setAttribute

      boolean setAttribute(PerunSession sess, Object object, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException
      Store the particular attribute associated with the given perun bean. If an attribute is core attribute then the attribute isn't stored (It's skkiped whithout any notification).
      Parameters:
      sess - perun session
      object - object of setting the attribute, must be one of perunBean or string
      attribute - attribute to set
      Returns:
      true if new value differs from old value (i.e. values changed) false otherwise (value do not change)
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeAssignmentException - if the namespace of the attribute does not match the perunBean
      WrongAttributeValueException
    • setAttribute

      boolean setAttribute(PerunSession sess, PerunBean bean1, PerunBean bean2, Attribute attribute) throws WrongAttributeAssignmentException, WrongAttributeValueException
      Store the particular attribute associated with the bean1 and bean2. If an attribute is core attribute then the attribute isn't stored (It's skkiped whithout any notification).
      Parameters:
      sess - perun session
      bean1 - first perun bean
      bean2 - second perun bean
      attribute - attribute to set
      Returns:
      true if new value differs from old value (i.e. values changed) false otherwise (value do not change)
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeAssignmentException
      WrongAttributeValueException
    • insertAttribute

      boolean insertAttribute(PerunSession sess, Attribute attribute, String tableName, List<String> columnNames, List<Object> columnValues)
      Insert attribute value in DB.
      Parameters:
      sess - perun session
      attribute - that will be stored in the DB
      tableName - in the database in which the attribute will be inserted
      columnNames - of the database table in which the attribute will be written
      columnValues - of the objects, for which the attribute will be written, corresponding to the columnNames
      Returns:
      true if new value differs from old value (i.e. values changed) false otherwise (value do not change)
    • updateAttribute

      boolean updateAttribute(PerunSession sess, Attribute attribute, String tableName, List<String> columnNames, List<Object> columnValues)
      Update attribute value in DB.
      Parameters:
      sess - perun session
      attribute - that will be stored in the DB
      tableName - in the database for updating
      columnNames - of the database table in which the attribute will be written
      columnValues - of the objects, for which the attribute will be written, corresponding to the columnNames
      Returns:
      true if new value differs from old value (i.e. values changed) false otherwise (value do not change)
    • setAttributeWithNullValue

      boolean setAttributeWithNullValue(PerunSession sess, String key, Attribute attribute)
      Set entityless attribute with null value (for key and attribute). Shouldn't be called from upper layer !!!
      Parameters:
      sess -
      key - key for storing entityless attribute
      attribute - attribute to set
      Returns:
      true if insert is ok
      Throws:
      InternalErrorException - if runtimeException is thrown
    • setAttributeWithNullValue

      boolean setAttributeWithNullValue(PerunSession sess, int userId, Attribute attribute)
      Set user attribute with null value (for user and attribute). Shouldn't be called from upper layer !!!
      Parameters:
      sess -
      userId - ID of User to store attribute for
      attribute - attribute to set
      Returns:
      true if insert is ok
      Throws:
      InternalErrorException - if runtimeException is thrown
    • setVirtualAttribute

      boolean setVirtualAttribute(PerunSession sess, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException
      Store the particular virtual attribute associated with the facility.
      Parameters:
      sess - perun session
      facility -
      attribute - attribute to set
      Returns:
      true if attribute was really changed
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      ModuleNotExistsException
      WrongModuleTypeException
      WrongReferenceAttributeValueException
    • setVirtualAttribute

      boolean setVirtualAttribute(PerunSession sess, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException
      Store the particular virtual attribute associated with the resource.
      Parameters:
      sess - perun session
      resource -
      attribute - attribute to set
      Returns:
      true if attribute was really changed
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      ModuleNotExistsException
      WrongModuleTypeException
      WrongReferenceAttributeValueException
    • setVirtualAttribute

      boolean setVirtualAttribute(PerunSession sess, Group group, Attribute attribute)
      Store the particular virtual attribute associated with the group.
      Parameters:
      sess - perun session
      group -
      attribute - attribute to set
      Returns:
      true if attribute was really changed
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      ModuleNotExistsException
      WrongModuleTypeException
    • setVirtualAttribute

      boolean setVirtualAttribute(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongReferenceAttributeValueException
      Store the particular virtual attribute associated with the facility and user combination.
      Parameters:
      sess - perun session
      facility -
      user -
      attribute - attribute to set
      Returns:
      true if attribute was really changed
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      ModuleNotExistsException
      WrongModuleTypeException
      WrongReferenceAttributeValueException
    • setVirtualAttribute

      boolean setVirtualAttribute(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongReferenceAttributeValueException
      Store the particular virtual attribute associated with the resource and group combination.
      Parameters:
      sess - perun session
      resource -
      group -
      attribute - attribute to set
      Returns:
      true if attribute was really changed
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      ModuleNotExistsException
      WrongModuleTypeException
      WrongReferenceAttributeValueException
    • setVirtualAttribute

      boolean setVirtualAttribute(PerunSession sess, Member member, Group group, Attribute attribute)
      Store the particular virtual attribute associated with the member and group combination.
      Parameters:
      sess - perun session
      member - member to set on
      group - group to set on
      attribute - attribute to set
      Returns:
      true if attribute was really changed
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      ModuleNotExistsException
      WrongModuleTypeException
    • setVirtualAttribute

      boolean setVirtualAttribute(PerunSession sess, Member member, Attribute attribute)
      Store the particular virtual attribute associated with the member.
      Parameters:
      sess - perun session
      member -
      attribute - attribute to set
      Returns:
      true if attribute was really changed
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      ModuleNotExistsException
      WrongModuleTypeException
    • setVirtualAttribute

      boolean setVirtualAttribute(PerunSession sess, User user, Attribute attribute)
      Store the particular virtual attribute associated with the user.
      Parameters:
      sess - perun session
      user -
      attribute - attribute to set
      Returns:
      true if attribute was really changed
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      ModuleNotExistsException
      WrongModuleTypeException
    • setVirtualAttribute

      boolean setVirtualAttribute(PerunSession sess, UserExtSource ues, Attribute attribute)
      Store the particular virtual attribute associated with the user external source.
      Parameters:
      sess - perun session
      ues -
      attribute - attribute to set
      Returns:
      true if attribute was really changed
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      ModuleNotExistsException
      WrongModuleTypeException
    • createAttribute

      Creates an attribute, the attribute is stored into the appropriate DB table according to the namespace.
      Parameters:
      sess -
      attribute - attribute to create
      Returns:
      attribute with set id
      Throws:
      AttributeDefinitionExistsException - if attribute already exists
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • deleteAttribute

      void deleteAttribute(PerunSession sess, AttributeDefinition attribute)
      Deletes the attribute. Definition and all values.
      Parameters:
      sess -
      attribute - attribute to delete
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • deleteAllAttributeAuthz

      void deleteAllAttributeAuthz(PerunSession sess, AttributeDefinition attribute)
      Delete all authz for the attribute.
      Parameters:
      sess -
      attribute - the attribute
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorExceptions
    • getResourceRequiredAttributesDefinition

      List<AttributeDefinition> getResourceRequiredAttributesDefinition(PerunSession sess, Resource resource)
      Get attributes definions required by all services assigned on the resource.
      Parameters:
      sess - perun session
      resource -
      Returns:
      attributes definions required by all services assigned on the resource.
      Throws:
      InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Facility facility)
      Get facility attributes which are required by services. Services are known from the resource.
      Parameters:
      sess - perun session
      resourceToGetServicesFrom - resource from which the services are taken
      facility - you get attributes for this facility
      Returns:
      list of facility attributes which are required by services which are assigned to resource
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Resource resource, List<Integer> serviceIds)
      Get resource attributes which are required by services.
      Parameters:
      sess - perun session
      resource -
      serviceIds -
      Returns:
      list of resource attributes which are required by services which are selceted
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource)
      Get resource attributes which are required by services. Services are known from the resourceToGetServicesFrom.
      Parameters:
      sess - perun session
      resourceToGetServicesFrom - resource from which the services are taken
      resource - resource for which you want to get the attributes
      Returns:
      list of resource attributes which are required by services which are assigned to resource.
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member)
      Get member attributes which are required by services. Services are known from the resourceToGetServicesFrom.
      Parameters:
      sess - perun session
      resourceToGetServicesFrom - resource from which the services are taken
      member - you get attributes for this member
      Returns:
      list of member attributes which are required by services which are assigned to resource.
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Resource resource)
      Get member-resource attributes which are required by services. Services are known from the resourceToGetServicesFrom.
      Parameters:
      sess - perun session
      resourceToGetServicesFrom - resource from which the services are taken
      member - you get attributes for this member and the resource
      resource - you get attributes for this resource and the member
      Returns:
      list of member-resource attributes which are required by services which are assigned to another resource.
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Facility facility, User user)
      Get user-facility attributes which are required by services. Services are known from the resource.
      Parameters:
      sess - perun session
      resourceToGetServicesFrom - resource from which the services are taken
      facility - facility from which the services are taken
      user - you get attributes for this user
      Returns:
      list of member-resource attributes which are required by services which are assigned to another resource.
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Resource resource, Group group)
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, User user)
      Get user attributes which are required by services. Services are known from the resource.
      Parameters:
      sess - perun session
      resourceToGetServicesFrom -
      user - you get attributes for this user
      Returns:
      list of user attributes which are required by services which are assigned to resource.
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Host host)
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Group group)
    • getRequiredAttributesDefinition

      List<AttributeDefinition> getRequiredAttributesDefinition(PerunSession sess, Service service)
      Get all attributes which are required by service. Required attribues are requisite for Service to run.
      Parameters:
      sess - sess
      service - service from which the attributes will be listed
      Returns:
      All attributes which are required by service.
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Facility facility)
      Get facility attributes which are required by all services which are connected to this facility.
      Parameters:
      sess - perun session
      facility - you get attributes for this facility
      Returns:
      list of facility attributes which are required by all services which are connected to this facility.
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Facility facility)
      Get facility attributes which are required by the service.
      Parameters:
      sess - perun session
      facility - you get attributes for this facility
      service - attribute required by this service you'll get
      Returns:
      list of facility attributes which are required by the service
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Vo vo)
      Get vo attributes which are required by the service.
      Parameters:
      sess - perun session
      vo - you get attributes for this vo
      service - attribute required by this service you'll get
      Returns:
      list of vo attributes which are required by the service
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Resource resource)
      Get resource attributes which are required by the service.
      Parameters:
      sess - perun session
      resource - resource for which you want to get the attributes
      service - attribute required by this service you'll get
      Returns:
      list of resource attributes which are required by the service
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Resource resource)
      Get member-resource attributes which are required by the service.
      Parameters:
      sess - perun session
      service - attribute required by this service you'll get
      member - you get attributes for this member and the resource
      resource - you get attributes for this resource and the member
      Returns:
      list of attributes which are required by the service.
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      HashMap<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, Resource resource, List<Member> members)
      Get member-resource attributes which are required by service for each member in list of members.
      Parameters:
      sess - perun session
      service - attribute required by this service
      resource - you get attributes for this resource and the members
      members - you get attributes for this list of members and the resource
      Returns:
      map of member and his list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      HashMap<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Resource resource, Service service, List<Member> members)
      Get member attributes which are required by service for each member in list of members.
      Parameters:
      sess - perun session
      service - attribute required by this service
      resource - resource only to get allowed members
      members - you get attributes for this list of members
      Returns:
      map of member and his list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      HashMap<User,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, Facility facility, List<User> users)
      Get user-facility attributes which are required by the service for each user in list of users.
      Parameters:
      sess - perun session
      service - attribute required by this service
      facility - you get attributes for this facility and user
      users - you get attributes for this user and facility
      Returns:
      map of userID and his list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      HashMap<User,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, List<User> users)
      Get user attributes which are required by the service for each user in list of users.
      Parameters:
      sess - perun session
      service - attribute required by this service
      users - you get attributes for this user and facility
      Returns:
      map of userID and his list of attributes
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member, Group group)
      Get member-group attributes which are required by the service.
      Parameters:
      sess - perun session
      member - you get attributes for this member and the group
      group - you get attributes for this group in which member is associated
      service - attribute required by this service you'll get
      Returns:
      list of attributes which are required by the service.
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      Map<Member,List<Attribute>> getRequiredAttributes(PerunSession sess, Service service, List<Member> members, Group group)
      Get member-group attributes which are required by the service, for the given members and the given group.
      Parameters:
      sess - perun session
      members - you get attributes for this member and the group
      group - you get attributes for these groups in which member is associated
      service - attribute required by this service you'll get
      Returns:
      list of attributes which are required by the service.
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Resource resourceToGetServicesFrom, Member member, Group group)
      Get member-group attributes which are required by services. Services are known from the resourceToGetServicesFrom.
      Parameters:
      sess - perun session
      resourceToGetServicesFrom - resource from which the services are taken
      group - you get attributes for this group and the member
      member - you get attributes for this member and the group
      Returns:
      list of member-group attributes which are required by services which are assigned to another resource.
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Member member)
      Get member attributes which are required by the service.
      Parameters:
      sess - perun session
      service - attribute required by this service you'll get
      member -
      Returns:
      list of attributes which are required by the service.
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Facility facility, User user)
      Get user-facility attributes which are required by the service.
      Parameters:
      sess - perun session
      service - attribute required by this service you'll get
      facility -
      user -
      Returns:
      list of attributes which are required by the service.
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Service service, User user)
      Get user attributes which are required by the service.
      Parameters:
      sess - perun session
      service - attribute required by this service you'll get
      user -
      Returns:
      list of attributes which are required by the service.
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Resource resource, Group group)
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Resource resource, Group group)
      Get group-resource attributes which are required by the services.
      Parameters:
      sess - session
      services - services
      resource - resource
      group - group
      Returns:
      list of attributes which are required by the service.
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Host host)
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, Service service, Group group)
    • getRequiredAttributesForGroups

      Map<Group,List<Attribute>> getRequiredAttributesForGroups(PerunSession sess, Service service, List<Group> groups)
      Get group attributes which are required by the given service for given groups.
      Parameters:
      sess - session
      service - service for which are taken the required attributes
      groups - groups
      Returns:
      attributes mapped by their groups
    • getRequiredAttributes

      List<Attribute> getRequiredAttributes(PerunSession sess, List<Service> services, Group group)
      Get group attributes which are required by the given services.
      Parameters:
      sess - session
      services - services
      group - group
      Returns:
      list of group attributes which are required by the given services
    • fillAttribute

      Attribute fillAttribute(PerunSession sess, Resource resource, Attribute attribute)
      This method try to fill a value of the resource attribute. Value may be copied from some facility attribute.
      Parameters:
      sess - perun session
      resource - resource, attribute of which you want to fill
      attribute - attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.
      Returns:
      attribute which MAY have filled value
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • fillAttribute

      Attribute fillAttribute(PerunSession sess, Member member, Resource resource, Attribute attribute)
      This method try to fill value of the member-resource attribute. This value is automatically generated, but not all atrributes can be filled this way.
      Parameters:
      sess - perun session
      member - attribute of this member (and resource) and you want to fill
      resource - attribute of this resource (and member) and you want to fill
      attribute - attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.
      Returns:
      attribute which MAY have filled value
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • fillAttribute

      Attribute fillAttribute(PerunSession sess, Member member, Group group, Attribute attribute)
      This method tries to fill value of the member-group attribute. This value is automatically generated, but not all attributes can be filled this way.
      Parameters:
      sess - perun session
      member - attribute of this member (and group) you want to fill
      group - attribute of this group you want to fill
      attribute - attribute to fill. If attributes already have set value, this value won't be overwritten. This means the attribute value must be empty otherwise this method won't fill it.
      Returns:
      attribute which MAY have filled value
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • fillAttribute

      Attribute fillAttribute(PerunSession sess, Facility facility, User user, Attribute attribute)
      This method try to fill value of the user-facility attribute. This value is automatically generated, but not all atrributes can be filled this way.
      Parameters:
      sess - perun session
      facility - attribute of this facility (and user) and you want to fill
      user - attribute of this user (and facility) and you want to fill
      attribute - attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.
      Returns:
      attribute which MAY have filled value
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • fillAttribute

      Attribute fillAttribute(PerunSession sess, User user, Attribute attribute)
      This method try to fill value of the user attribute. This value is automatically generated, but not all atrributes can be filled this way.
      Parameters:
      sess - perun session
      user - attribute of this user (and facility) and you want to fill
      attribute - attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.
      Returns:
      attribute which MAY have filled value
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • fillAttribute

      Attribute fillAttribute(PerunSession sess, Member member, Attribute attribute)
      This method try to fill value of the member attribute. This value is automatically generated, but not all atrributes can be filled this way.
      Parameters:
      sess - perun session
      member - attribute of this member (and facility) and you want to fill
      attribute - attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.
      Returns:
      attribute which MAY have filled value
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • fillAttribute

      Attribute fillAttribute(PerunSession sess, Host host, Attribute attribute)
    • fillAttribute

      Attribute fillAttribute(PerunSession sess, Resource resource, Group group, Attribute attribute)
    • fillAttribute

      Attribute fillAttribute(PerunSession sess, Group group, Attribute attribute)
    • fillAttribute

      Attribute fillAttribute(PerunSession sess, UserExtSource ues, Attribute attribute)
      This method try to fill value of the user external source attribute. This value is automatically generated, but not all atrributes can be filled this way.
      Parameters:
      sess - perun session
      ues - attribute of this user external source you want to fill
      attribute - attribute to fill. If attributes already have set value, this value won't be owerwriten. This means the attribute value must be empty otherwise this method won't fill it.
      Returns:
      attribute which may have filled value
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • changedAttributeHook

      void changedAttributeHook(PerunSession sess, Facility facility, Attribute attribute)
      If you need to do some further work with other modules, this method do that
      Parameters:
      sess - perun session
      facility -
      attribute -
      Throws:
      InternalErrorException
    • changedAttributeHook

      void changedAttributeHook(PerunSession sess, String key, Attribute attribute)
      If you need to do some further work with other modules, this method do that
      Parameters:
      sess - perun session
      key -
      attribute -
      Throws:
      InternalErrorException
    • changedAttributeHook

      void changedAttributeHook(PerunSession sess, Vo vo, Attribute attribute)
      If you need to do some further work with other modules, this method do that
      Parameters:
      sess -
      vo -
      attribute -
      Throws:
      InternalErrorException
    • changedAttributeHook

      void changedAttributeHook(PerunSession sess, Host host, Attribute attribute)
      If you need to do some further work with other modules, this method do that
      Parameters:
      sess -
      host -
      attribute -
      Throws:
      InternalErrorException
    • changedAttributeHook

      void changedAttributeHook(PerunSession sess, Group group, Attribute attribute) throws WrongReferenceAttributeValueException
      If you need to do some further work with other modules, this method do that
      Parameters:
      sess -
      group -
      attribute -
      Throws:
      InternalErrorException
      WrongReferenceAttributeValueException
    • changedAttributeHook

      void changedAttributeHook(PerunSession sess, User user, Attribute attribute) throws WrongReferenceAttributeValueException
      If you need to do some further work with other modules, this method do that
      Parameters:
      sess -
      user -
      attribute -
      Throws:
      InternalErrorException
      WrongReferenceAttributeValueException
    • changedAttributeHook

      void changedAttributeHook(PerunSession sess, Member member, Attribute attribute) throws WrongReferenceAttributeValueException
      If you need to do some further work with other modules, this method do that
      Parameters:
      sess -
      member -
      attribute -
      Throws:
      InternalErrorException
      WrongReferenceAttributeValueException
    • changedAttributeHook

      void changedAttributeHook(PerunSession sess, Resource resource, Group group, Attribute attribute)
      If you need to do some further work with other modules, this method do that
      Parameters:
      sess -
      resource -
      group -
      attribute -
      Throws:
      InternalErrorException
    • changedAttributeHook

      void changedAttributeHook(PerunSession sess, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException
      If you need to do some further work with other modules, this method do that
      Parameters:
      sess -
      resource -
      attribute -
      Throws:
      InternalErrorException
      WrongReferenceAttributeValueException
    • changedAttributeHook

      void changedAttributeHook(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException
      If you need to do some further work with other modules, this method do that
      Parameters:
      sess -
      member -
      resource -
      attribute -
      Throws:
      InternalErrorException
      WrongReferenceAttributeValueException
    • changedAttributeHook

      void changedAttributeHook(PerunSession sess, Member member, Group group, Attribute attribute)
      If you need to do some further work with other modules, this method do that
      Parameters:
      sess -
      member -
      group -
      attribute -
      Throws:
      InternalErrorException
    • changedAttributeHook

      void changedAttributeHook(PerunSession sess, Facility facility, User user, Attribute attribute)
      If you need to do some further work with other modules, this method do that
      Parameters:
      sess -
      facility -
      user -
      attribute -
      Throws:
      InternalErrorException
    • changedAttributeHook

      void changedAttributeHook(PerunSession sess, UserExtSource ues, Attribute attribute)
      If you need to do some further work with other modules, this method do that
      Parameters:
      sess -
      ues -
      attribute -
      Throws:
      InternalErrorException
    • checkAttributeSemantics

      void checkAttributeSemantics(PerunSession sess, Facility facility, Attribute attribute) throws WrongReferenceAttributeValueException
      Check if value of this facility attribute has valid semantics.
      Parameters:
      sess - perun session
      facility - facility for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongReferenceAttributeValueException - if the attribute value has wrong/illegal semantics
    • checkAttributeSemantics

      void checkAttributeSemantics(PerunSession sess, Vo vo, Attribute attribute) throws WrongReferenceAttributeValueException
      Check if value of this vo attribute has valid semantics.
      Parameters:
      sess - perun session
      vo - vo for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongReferenceAttributeValueException - if the attribute value has wrong/illegal semantics
    • checkAttributeSemantics

      void checkAttributeSemantics(PerunSession sess, Group group, Attribute attribute) throws WrongReferenceAttributeValueException
      Check if value of this group attribute has valid semantics.
      Parameters:
      sess - perun session
      group - group for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongReferenceAttributeValueException - if the attribute value has wrong/illegal semantics
    • checkAttributeSemantics

      void checkAttributeSemantics(PerunSession sess, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException
      Check if value of this resource attribute has valid semantics.
      Parameters:
      sess - perun session
      resource - resource for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongReferenceAttributeValueException - if the attribute value has wrong/illegal semantics
    • checkAttributeSemantics

      void checkAttributeSemantics(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongReferenceAttributeValueException
      Check if value of this member-resource attribute has valid semantics.
      Parameters:
      sess - perun session
      member - member for which (and for specified resource) you want to check validity of attribute
      resource - resource for which (and for specified member) you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongReferenceAttributeValueException - if the attribute value has wrong/illegal semantics
    • checkAttributeSemantics

      void checkAttributeSemantics(PerunSession sess, Member member, Group group, Attribute attribute)
      Check if value of this member-group attribute has valid semantics.
      Parameters:
      sess - perun session
      group - group for which (and for specified member) you want to check validity of attribute
      member - member for which (and for specified group) you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • checkAttributeSemantics

      void checkAttributeSemantics(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongReferenceAttributeValueException
      Check if value of this user-facility attribute has valid semantics.
      Parameters:
      sess - perun session
      facility - facility for which (and for specified user) you want to check validity of attribute
      user - user for which (and for specified facility) you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongReferenceAttributeValueException - if the attribute value has wrong/illegal semantics
    • checkAttributeSemantics

      void checkAttributeSemantics(PerunSession sess, User user, Attribute attribute) throws WrongReferenceAttributeValueException
      Check if value of this user attribute has valid semantics.
      Parameters:
      sess - perun session
      user - user for which (and for specified facility) you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongReferenceAttributeValueException - if the attribute value has wrong/illegal semantics
    • checkAttributeSemantics

      void checkAttributeSemantics(PerunSession sess, Member member, Attribute attribute) throws WrongReferenceAttributeValueException
      Check if value of this member attribute has valid semantics.
      Parameters:
      sess - perun session
      member - member for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongReferenceAttributeValueException - if the attribute value has wrong/illegal semantics
    • checkAttributeSemantics

      void checkAttributeSemantics(PerunSession sess, Host host, Attribute attribute)
      Check if value of this host attribute has valid semantics.
      Parameters:
      sess - perun session
      host - host for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • checkAttributeSemantics

      void checkAttributeSemantics(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongReferenceAttributeValueException
      Check if value of this group-resource attribute has valid semantics.
      Parameters:
      sess - perun session
      resource - resource for which (and for specified group) you want to check validity of attribute
      group - group for which (and for specified member) you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongReferenceAttributeValueException - if the attribute value has wrong/illegal semantics
    • checkAttributeSemantics

      void checkAttributeSemantics(PerunSession sess, String key, Attribute attribute) throws WrongReferenceAttributeValueException
      Check if value of this entityless attribute has valid semantics.
      Parameters:
      sess - perun session
      key - key for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongReferenceAttributeValueException - if the attribute value has wrong/illegal semantics
    • checkAttributeSemantics

      void checkAttributeSemantics(PerunSession sess, UserExtSource ues, Attribute attribute)
      Check if value of this user external source attribute has valid semantics.
      Parameters:
      sess - perun session
      ues - user external source for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • checkAttributeSyntax

      void checkAttributeSyntax(PerunSession sess, Facility facility, Attribute attribute) throws WrongAttributeValueException
      Check if value of this facility attribute has valid syntax.
      Parameters:
      sess - perun session
      facility - facility for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeValueException - if the attribute value has wrong/illegal syntax
    • checkAttributeSyntax

      void checkAttributeSyntax(PerunSession sess, Vo vo, Attribute attribute) throws WrongAttributeValueException
      Check if value of this vo attribute has valid syntax.
      Parameters:
      sess - perun session
      vo - vo for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeValueException - if the attribute value has wrong/illegal syntax
    • checkAttributeSyntax

      void checkAttributeSyntax(PerunSession sess, Group group, Attribute attribute) throws WrongAttributeValueException
      Check if value of this group attribute has valid syntax.
      Parameters:
      sess - perun session
      group - group for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeValueException - if the attribute value has wrong/illegal syntax
    • checkAttributeSyntax

      void checkAttributeSyntax(PerunSession sess, Resource resource, Attribute attribute) throws WrongAttributeValueException
      Check if value of this resource attribute has valid syntax.
      Parameters:
      sess - perun session
      resource - resource for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeValueException - if the attribute value has wrong/illegal syntax
    • checkAttributeSyntax

      void checkAttributeSyntax(PerunSession sess, Member member, Resource resource, Attribute attribute) throws WrongAttributeValueException
      Check if value of this member-resource attribute has valid syntax.
      Parameters:
      sess - perun session
      member - member for which (and for specified resource) you want to check validity of attribute
      resource - resource for which (and for specified member) you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeValueException - if the attribute value has wrong/illegal syntax
    • checkAttributeSyntax

      void checkAttributeSyntax(PerunSession sess, Member member, Group group, Attribute attribute) throws WrongAttributeValueException
      Check if value of this member-group attribute has valid syntax.
      Parameters:
      sess - perun session
      group - group for which (and for specified member) you want to check validity of attribute
      member - member for which (and for specified group) you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeValueException - if the attribute value has wrong/illegal syntax
    • checkAttributeSyntax

      void checkAttributeSyntax(PerunSession sess, Facility facility, User user, Attribute attribute) throws WrongAttributeValueException
      Check if value of this user-facility attribute has valid syntax.
      Parameters:
      sess - perun session
      facility - facility for which (and for specified user) you want to check validity of attribute
      user - user for which (and for specified facility) you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeValueException - if the attribute value has wrong/illegal syntax
    • checkAttributeSyntax

      void checkAttributeSyntax(PerunSession sess, User user, Attribute attribute) throws WrongAttributeValueException
      Check if value of this user attribute has valid syntax.
      Parameters:
      sess - perun session
      user - user for which (and for specified facility) you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeValueException - if the attribute value has wrong/illegal syntax
    • checkAttributeSyntax

      void checkAttributeSyntax(PerunSession sess, Member member, Attribute attribute) throws WrongAttributeValueException
      Check if value of this member attribute has valid syntax.
      Parameters:
      sess - perun session
      member - member for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeValueException - if the attribute value has wrong/illegal syntax
    • checkAttributeSyntax

      void checkAttributeSyntax(PerunSession sess, Host host, Attribute attribute) throws WrongAttributeValueException
      Check if value of this host attribute has valid syntax.
      Parameters:
      sess - perun session
      host - host for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeValueException - if the attribute value has wrong/illegal syntax
    • checkAttributeSyntax

      void checkAttributeSyntax(PerunSession sess, Resource resource, Group group, Attribute attribute) throws WrongAttributeValueException
      Check if value of this group-resource attribute has valid syntax.
      Parameters:
      sess - perun session
      group - group for which (and for specified resource) you want to check validity of attribute
      resource - resource for which (and for specified group) you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeValueException - if the attribute value has wrong/illegal syntax
    • checkAttributeSyntax

      void checkAttributeSyntax(PerunSession sess, String key, Attribute attribute) throws WrongAttributeValueException
      Check if value of this entityless attribute has valid syntax.
      Parameters:
      sess - perun session
      key - key for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeValueException - if the attribute value has wrong/illegal syntax
    • checkAttributeSyntax

      void checkAttributeSyntax(PerunSession sess, UserExtSource ues, Attribute attribute) throws WrongAttributeValueException
      Check if value of this user external source attribute has valid syntax.
      Parameters:
      sess - perun session
      ues - user external source for which you want to check validity of attribute
      attribute - attribute to check
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      WrongAttributeValueException - if the attribute value has wrong/illegal syntax
    • getAnonymizedValue

      Attribute getAnonymizedValue(PerunSession sess, User user, Attribute attribute) throws AnonymizationNotSupportedException
      Gets anonymized value of the attribute.
      Parameters:
      sess - perun session
      user - user
      attribute - attribute to get anonymized value from
      Returns:
      attribute with anonymized value
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
      AnonymizationNotSupportedException - if the module doesn't exist or it doesn't implement this method
    • removeAttribute

      boolean removeAttribute(PerunSession sess, Facility facility, AttributeDefinition attribute)
      Unset particular attribute for the facility.
      Parameters:
      sess - perun session
      facility - remove attribute from this facility
      attribute - attribute to remove
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAttribute

      boolean removeAttribute(PerunSession sess, String key, AttributeDefinition attribute)
      Unset particular entityless attribute with subject equals key.
      Parameters:
      sess - perun session
      key - subject of entityless attribute
      attribute - attribute to remove
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllAttributes

      boolean removeAllAttributes(PerunSession sess, Facility facility)
      Unset all attributes for the facility.
      Parameters:
      sess - perun session
      facility - remove attributes from this facility
      Returns:
      true if attributes was deleted or false if attributes was not deleted
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllGroupResourceAttributes

      void removeAllGroupResourceAttributes(PerunSession sess, Resource resource)
      Remove all non-virtual group-resource attribute on selected resource
      Parameters:
      sess -
      resource -
      Throws:
      InternalErrorException
    • removeAllMemberResourceAttributes

      void removeAllMemberResourceAttributes(PerunSession sess, Resource resource)
      Remove all non-virtual member-resource attributes assigned to resource
      Parameters:
      sess -
      resource -
      Throws:
      InternalErrorException
    • removeAttribute

      boolean removeAttribute(PerunSession sess, Vo vo, AttributeDefinition attribute)
      Unset particular attribute for the vo.
      Parameters:
      sess - perun session
      vo - remove attribute from this vo
      attribute - attribute to remove
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllAttributes

      boolean removeAllAttributes(PerunSession sess, Vo vo)
      Unset all attributes for the vo.
      Parameters:
      sess - perun session
      vo - remove attributes from this vo
      Returns:
      true if attributes was deleted or false if attributes was not deleted
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAttribute

      boolean removeAttribute(PerunSession sess, Group group, AttributeDefinition attribute)
      Unset particular attribute for the group.
      Parameters:
      sess - perun session
      group - remove attribute from this group
      attribute - attribute to remove
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllAttributes

      boolean removeAllAttributes(PerunSession sess, Group group)
      Unset all attributes for the group.
      Parameters:
      sess - perun session
      group - remove attributes from this group
      Returns:
      true if attributes was deleted or false if attributes was not deleted
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAttribute

      boolean removeAttribute(PerunSession sess, Resource resource, AttributeDefinition attribute)
      Unset particular attribute for the resource.
      Parameters:
      sess - perun session
      resource - remove attribute from this resource
      attribute - attribute to remove
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllAttributes

      boolean removeAllAttributes(PerunSession sess, Resource resource)
      Unset all attributes for the resource.
      Parameters:
      sess - perun session
      resource - remove attributes from this resource
      Returns:
      true if attributes was deleted or false if attributes was not deleted
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAttribute

      boolean removeAttribute(PerunSession sess, Member member, Resource resource, AttributeDefinition attribute)
      Unset particular member-resorce attribute for the member on the resource.
      Parameters:
      sess - perun session
      member - remove attribute from this member
      resource - remove attributes for this resource
      attribute - attribute to remove
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllAttributes

      boolean removeAllAttributes(PerunSession sess, Member member, Resource resource)
      Unset all (member-resource) attributes for the member on the resource.
      Parameters:
      sess - perun session
      member - remove attributes from this member
      resource - remove attributes from this resource
      Returns:
      true if attributes was deleted or false if attributes was not deleted
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAttribute

      boolean removeAttribute(PerunSession sess, Member member, Group group, AttributeDefinition attribute)
      Unset particular attribute for the member in the group. Core attributes can't be removed this way.
      Parameters:
      sess - perun session
      group - remove attributes for this group
      member - remove attribute from this member
      attribute - attribute to remove
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllAttributes

      boolean removeAllAttributes(PerunSession sess, Member member, Group group)
      Unset all attributes for the member in the group.
      Parameters:
      sess - perun session
      group - remove attributes for this group
      member - remove attributes from this member
      Returns:
      true if attributes was deleted or false if attributes was not deleted
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAttribute

      boolean removeAttribute(PerunSession sess, Member member, AttributeDefinition attribute)
      Unset particular member attribute
      Parameters:
      sess - perun session
      member -
      attribute - attribute to remove
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllAttributes

      boolean removeAllAttributes(PerunSession sess, Member member)
      Unset all member attributes for the member.
      Parameters:
      sess - perun session
      member -
      Returns:
      true if attributes was deleted or false if attributes was not deleted
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAttribute

      boolean removeAttribute(PerunSession sess, Facility facility, User user, AttributeDefinition attribute)
      Unset particular user-facility attribute
      Parameters:
      sess - perun session
      facility -
      user -
      attribute - attribute to remove
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllAttributes

      boolean removeAllAttributes(PerunSession sess, Facility facility, User user)
      Unset all (user-facility) non-virtual attributes for the user on the facility.
      Parameters:
      sess - perun session
      facility -
      user -
      Returns:
      true if attributes was deleted or false if attributes was not deleted
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllUserFacilityAttributesForAnyUser

      boolean removeAllUserFacilityAttributesForAnyUser(PerunSession sess, Facility facility)
      Unset all (user-facility) non-virtual attributes for any user on the facility.
      Parameters:
      sess - perun session
      facility -
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllUserFacilityAttributes

      boolean removeAllUserFacilityAttributes(PerunSession sess, User user)
      Unset all (user-facility) non-virtual attributes for the user and all facilities
      Parameters:
      sess - perun session
      user -
      Returns:
      true if attributes was deleted or false if attributes was not deleted
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeVirtualAttribute

      boolean removeVirtualAttribute(PerunSession sess, Facility facility, User user, AttributeDefinition attribute)
      Unset particular user-facility virtual attribute value.
      Parameters:
      sess - perun session
      facility -
      user -
      attribute - attribute to remove
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeVirtualAttribute

      boolean removeVirtualAttribute(PerunSession sess, Resource resource, AttributeDefinition attribute) throws WrongAttributeValueException, WrongReferenceAttributeValueException
      Unset particular resource virtual attribute value.
      Parameters:
      sess -
      resource -
      attribute -
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException
      WrongAttributeValueException
      WrongReferenceAttributeValueException
    • removeVirtualAttribute

      boolean removeVirtualAttribute(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute)
      Unset particular group-resource virtual attribute value.
      Parameters:
      sess -
      resource -
      group -
      attribute -
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException
    • removeAttribute

      boolean removeAttribute(PerunSession sess, User user, AttributeDefinition attribute)
      Unset particular user attribute
      Parameters:
      sess - perun session
      user -
      attribute - attribute to remove
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllAttributes

      boolean removeAllAttributes(PerunSession sess, User user)
      Unset all user attributes for the user.
      Parameters:
      sess - perun session
      user -
      Returns:
      true if attributes was deleted or false if attributes was not deleted
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAttribute

      boolean removeAttribute(PerunSession sess, Host host, AttributeDefinition attribute)
      Unset particular host attribute
      Parameters:
      sess - perun session
      host -
      attribute - attribute to remove
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllAttributes

      boolean removeAllAttributes(PerunSession sess, Host host)
      Unset all user attributes for the host.
      Parameters:
      sess - perun session
      host -
      Returns:
      true if attributes was deleted or false if attributes was not deleted
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAttribute

      boolean removeAttribute(PerunSession sess, Resource resource, Group group, AttributeDefinition attribute)
      Unset particular group_resource attribute
      Parameters:
      sess - perun session
      resource - resource
      group - group
      attribute - attribute to remove
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllAttributes

      boolean removeAllAttributes(PerunSession sess, Resource resource, Group group)
      Unset all group_resource attributes
      Parameters:
      sess - perun session
      resource - Resource
      group - Group
      Returns:
      true if attributes was deleted or false if attributes was not deleted
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAttribute

      boolean removeAttribute(PerunSession sess, UserExtSource ues, AttributeDefinition attribute)
      Unset particular user external source attribute
      Parameters:
      sess - perun session
      ues -
      attribute - attribute to remove
      Returns:
      true if attribute was changed (deleted) or false if attribute was not present in a first place
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • removeAllAttributes

      boolean removeAllAttributes(PerunSession sess, UserExtSource ues)
      Unset all UserExtSource attributes for the user external source.
      Parameters:
      sess - perun session
      ues -
      Returns:
      true if attributes was deleted or false if attributes was not deleted
      Throws:
      InternalErrorException - if an exception raise in concrete implementation, the exception is wrapped in InternalErrorException
    • attributeExists

      boolean attributeExists(PerunSession sess, AttributeDefinition attribute)
      Check if attribute exists in underlaying data source.
      Parameters:
      sess - perun session
      attribute - attribute to check
      Returns:
      true if attribute exists in underlaying data source, false othewise
      Throws:
      InternalErrorException - if unexpected error occured
    • checkAttributeExists

      void checkAttributeExists(PerunSession sess, AttributeDefinition attribute) throws AttributeNotExistsException
      Check if attribute exists in underlaying data source.
      Parameters:
      sess - perun session
      attribute - attribute to check
      Throws:
      InternalErrorException - if unexpected error occured
      AttributeNotExistsException - if attribute doesn';t exists
    • checkActionTypeExists

      void checkActionTypeExists(PerunSession sess, ActionType actionType) throws ActionTypeNotExistsException
      Check if actionType exists in underlaying data source.
      Parameters:
      sess - perun session
      actionType - actionType to check
      Throws:
      InternalErrorException - if unexpected error occured
      ActionTypeNotExistsException - if attriobute doesn't exists
    • checkAttributesExists

      void checkAttributesExists(PerunSession sess, List<? extends AttributeDefinition> attributes) throws AttributeNotExistsException
      Batch version of checkAttributeExists
      Throws:
      AttributeNotExistsException
    • isCoreAttribute

      boolean isCoreAttribute(PerunSession sess, AttributeDefinition attribute)
      Determine if attribute is core attribute.
      Parameters:
      sess -
      attribute -
      Returns:
      true if attribute is core attribute
    • isDefAttribute

      boolean isDefAttribute(PerunSession sess, AttributeDefinition attribute)
      Determine if attribute is defined (def) attribute.
      Parameters:
      sess -
      attribute -
      Returns:
      true if attribute is defined attribute false otherwise
    • isOptAttribute

      boolean isOptAttribute(PerunSession sess, AttributeDefinition attribute)
      Determine if attribute is optional (opt) attribute.
      Parameters:
      sess -
      attribute -
      Returns:
      true if attribute is optional attribute false otherwise
    • isCoreManagedAttribute

      boolean isCoreManagedAttribute(PerunSession sess, AttributeDefinition attribute)
      Determine if attribute is core-managed attribute.
      Parameters:
      sess -
      attribute -
      Returns:
      true if attribute is core-managed
    • isVirtAttribute

      boolean isVirtAttribute(PerunSession sess, AttributeDefinition attribute)
      Determine if attribute is virtual attribute.
      Parameters:
      sess -
      attribute -
      Returns:
      true if attribute is virtual
    • isFromNamespace

      boolean isFromNamespace(AttributeDefinition attribute, String namespace)
      Determine if attribute is from specified namespace.
      Parameters:
      attribute -
      namespace -
      Returns:
      true if the attribute is from specified namespace false otherwise
    • checkNamespace

      void checkNamespace(PerunSession sess, AttributeDefinition attribute, String namespace) throws WrongAttributeAssignmentException
      Determine if attribute is from specified namespace.
      Parameters:
      sess -
      attribute -
      namespace -
      Throws:
      WrongAttributeAssignmentException - if the attribute isn't from specified namespace
    • checkNamespace

      void checkNamespace(PerunSession sess, List<? extends AttributeDefinition> attributes, String namespace) throws WrongAttributeAssignmentException
      Determine if attributes are from specified namespace.
      Parameters:
      sess -
      attributes -
      namespace -
      Throws:
      WrongAttributeAssignmentException - if any of the attribute isn't from specified namespace
    • getAllResourceValues

      List<Object> getAllResourceValues(PerunSession sess, AttributeDefinition attributeDefinition)
      Get all values for specified resource attribute. Atibute can't be core or virt.
      Parameters:
      sess -
      attributeDefinition - attribute definition, namespace resource
      Returns:
      Throws:
      InternalErrorException
    • getAllGroupResourceValues

      List<Object> getAllGroupResourceValues(PerunSession sess, AttributeDefinition attributeDefinition)
      Get all values for specified group-resource attribute. Atibute can't be core or virt.
      Parameters:
      sess -
      attributeDefinition - attribute definition, namespace group-resource
      Returns:
      Throws:
      InternalErrorException
    • getAllGroupValues

      List<Object> getAllGroupValues(PerunSession sess, AttributeDefinition attributeDefinition)
      Get all values for specified group attribute. Atibute can't be core or virt.
      Parameters:
      sess -
      attributeDefinition - attribute definition, namespace group
      Returns:
      Throws:
      InternalErrorException
    • getAllUserValues

      List<Object> getAllUserValues(PerunSession sess, AttributeDefinition attributeDefinition)
      Get all values for specified user attribute. Atibute can't be core or virt.
      Parameters:
      sess -
      attributeDefinition - attribute definition, namespace user
      Returns:
      Throws:
      InternalErrorException
    • isAttributeRequiredByFacility

      boolean isAttributeRequiredByFacility(PerunSession sess, Facility facility, AttributeDefinition attributeDefinition)
      Check if this attribute is currently required on this facility. Attribute can be from any namespace.
      Parameters:
      sess -
      facility -
      attributeDefinition -
      Returns:
      Throws:
      InternalErrorException
    • isAttributeRequiredByVo

      boolean isAttributeRequiredByVo(PerunSession sess, Vo vo, AttributeDefinition attributeDefinition)
      Check if this attribute is currently required on this vo. Attribute can be from any namespace.
      Parameters:
      sess -
      vo -
      attributeDefinition -
      Returns:
      Throws:
      InternalErrorException
    • isAttributeRequiredByGroup

      boolean isAttributeRequiredByGroup(PerunSession sess, Group group, AttributeDefinition attributeDefinition)
      Check if this attribute is currently required on this group. Attribute can be from any namespace.
      Parameters:
      sess -
      group -
      attributeDefinition -
      Returns:
      Throws:
      InternalErrorException
    • isAttributeRequiredByResource

      boolean isAttributeRequiredByResource(PerunSession sess, Resource resource, AttributeDefinition attributeDefinition)
      Check if this attribute is currently required on this resource. Attribute can be from any namespace.
      Parameters:
      sess -
      resource -
      attributeDefinition -
      Returns:
      Throws:
      InternalErrorException
    • getAllSimilarAttributeNames

      List<String> getAllSimilarAttributeNames(PerunSession sess, String startingPartOfAttributeName)
      This method get all similar attr_names which start with partOfAttributeName
      Parameters:
      sess -
      startingPartOfAttributeName - is something like: urn:perun:user_facility:attribute-def:def:login-namespace:
      Returns:
      list of similar attribute names like: urn:perun:user_facility:attribute-def:def:login-namespace:cesnet etc.
      Throws:
      InternalErrorException
      AttributeNotExistsException
    • getAttributesModule

      Object getAttributesModule(PerunSession sess, AttributeDefinition attribute)
      Get the attributeModule for the attribute
      Parameters:
      attribute - get the attribute module for this attribute
      See Also:
      • cz.metacentrum.perun.core.impl.AttributesManagerImpl#getAttributesModule(PerunSession,String)
    • getUninitializedAttributesModule

      AttributesModuleImplApi getUninitializedAttributesModule(PerunSession sess, AttributeDefinition attribute)
      Get uninitiated attributeModule for the attribute
      Parameters:
      attribute - get the attribute module for this attribute
      See Also:
    • updateAttributeDefinition

      AttributeDefinition updateAttributeDefinition(PerunSession perunSession, AttributeDefinition attributeDefinition)
      Updates AttributeDefinition.
      Parameters:
      perunSession -
      attributeDefinition -
      Returns:
      returns updated attributeDefinition
      Throws:
      InternalErrorException
    • getAttributeRights

      List<AttributeRights> getAttributeRights(PerunSession sess, int attributeId)
      Gets attribute rights of an attribute with id given as a parameter. If the attribute has no rights for a role, it returns empty list. That means the returned list has always 4 items for each of the roles VOADMIN, FACILITYADMIN, GROUPADMIN, SELF. Info: not return rights for role VoObserver (could be same like read rights for VoAdmin)
      Parameters:
      sess - perun session
      attributeId - id of the attribute
      Returns:
      all rights of the attribute
      Throws:
      InternalErrorException
    • setAttributeRight

      void setAttributeRight(PerunSession sess, AttributeRights right)
      Sets attribute right given as a parameter. The method sets the rights for attribute and role exactly as it is given in the list of action types. That means it can remove a right, if the right is missing in the list. Info: If there is role VoAdmin in the list, use it for setting also VoObserver rights (only for read) automatic
      Parameters:
      sess - perun session
      right - attribute right
      Throws:
      InternalErrorException
    • getUserVirtualAttributeModule

      UserVirtualAttributesModuleImplApi getUserVirtualAttributeModule(PerunSession sess, AttributeDefinition attribute)
      Get user virtual attribute module by the attribute.
      Parameters:
      sess -
      attribute - attribute for which you get the module
      Returns:
      instance of user attribute module
      Throws:
      InternalErrorException
      WrongModuleTypeException
      ModuleNotExistsException
    • initAndRegisterAttributeModules

      void initAndRegisterAttributeModules(PerunSession session, ServiceLoader<AttributesModuleImplApi> modules, Set<AttributeDefinition> allAttributesDef)
      Init attribute modules map in Impl layer. And register them in Auditer for message listening.
      Parameters:
      modules - List of attribute module class instances
      See Also:
    • initAttributeModule

      void initAttributeModule(AttributesModuleImplApi module)
      Add attribute module to attribute module map in Impl layer (if it is not there yet).
      Parameters:
      module - module to add
      See Also:
    • removeAttributeModule

      void removeAttributeModule(AttributesModuleImplApi module)
      Remove attribute module from attribute module map in Impl layer.
      Parameters:
      module - module to remove
      See Also:
    • registerAttributeModule

      void registerAttributeModule(AttributesModuleImplApi module)
      Register attribute module in Auditer for message listening (if it is not there yet).
      Parameters:
      module - module to register
      See Also:
    • unregisterAttributeModule

      void unregisterAttributeModule(AttributesModuleImplApi module)
      Unregister attribute module in Auditer from message listening (if it is not there yet).
      Parameters:
      module - module to unregister
      See Also:
    • getPerunBeanIdsForUniqueAttributeValue

      Set<Pair<Integer,Integer>> getPerunBeanIdsForUniqueAttributeValue(PerunSession sess, Attribute attribute)
      Finds ids of PerunBeans that have the attribute's value for the attribute. See AttributesManagerBl.getPerunBeanIdsForUniqueAttributeValue(PerunSession, Attribute) for details.
    • convertAttributeValuesToUnique

      void convertAttributeValuesToUnique(PerunSession session, AttributeDefinition attrDef)
      Copies all values of the attribute to table _attr_u_values which has unique constraint.
    • convertAttributeValuesToNonunique

      int convertAttributeValuesToNonunique(PerunSession session, AttributeDefinition attrDef)
      Deletes all values of the attribute from table _attr_u_values which has unique constraint. And returns how many rows were deleted.
    • escapeQueryParameters

      String escapeQueryParameters(String value)
      Escapes QUERY PARAMETER VALUES in URL value. Does not modify domain or parameters names. e.g. 'domain/?vo=vo name' => 'domain/?vo=vo+name'
    • setAttributePolicyCollections

      void setAttributePolicyCollections(PerunSession sess, List<AttributePolicyCollection> policyCollections)
      Deletes old attribute policy collections and sets all new attribute policy collections.
      Parameters:
      sess - perun session
      policyCollections - list of policy collections to set
      Throws:
      InternalErrorException
    • getAttributePolicyCollections

      List<AttributePolicyCollection> getAttributePolicyCollections(PerunSession sess, int attributeId)
      Gets attribute policy collections for an attribute definition with given id.
      Parameters:
      sess - perun session
      attributeId - id of the attribute definition
      Returns:
      all policy collections of the attribute definition
      Throws:
      InternalErrorException