Package com.complexible.stardog.api.admin

# Interface SensitivePropertyManager

All Known Implementing Classes:
  `DefaultSensitivePropertyManager`

public interface SensitivePropertyManager
Convenience class to manage sensitive properties for a database. The default sensitive properties are defined by the `SecurityOptions.SENSITIVE_PROPERTIES` option whereas the named sensitive property groups are defined by the `SecurityOptions.SENSITIVE_PROPERTY_GROUPS` option. Instead of dealing with these configuration options directly this class can be used to add, update or remove sensitive properties.

Author:
  Evren Sirin

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Set<String>`
  `getGroups()`
  Returns the sensitive property groups defined for the database.
  `Set<IRI>`
  `getProperties(String theGroup)`
  Returns the sensitive properties associated with a given group.
  `boolean`
  `removeGroup(String theGroup)`
  Removes the given sensitive property group from the database.
  `void`
  `setProperties(String theGroup, Set<IRI> theProperties)`
  Associates a set of properties with a group name.

- ## Method Details

  - ### getGroups

    Set<String> getGroups()
    Returns the sensitive property groups defined for the database.
    Returns:
      unmodifiable set of group names

  - ### getProperties

    Set<IRI> getProperties(String theGroup)
    Returns the sensitive properties associated with a given group.
    Parameters:
      `theGroup` - group name
    Returns:
      unmodifiable set of properties or empty set if the group is not defined

  - ### removeGroup

    boolean removeGroup(String theGroup)
    Removes the given sensitive property group from the database. The properties associated with the group will not be sensitive anymore unless they are included in other groups.
    Parameters:
      `theGroup` - group name
    Returns:
      `true` if the group was removed as a result of this call

  - ### setProperties

    void setProperties(String theGroup, Set<IRI> theProperties)
    Associates a set of properties with a group name. If the set is empty then the grouped will be removed except for the default group that will always exist even with empty set of properties. If the group already existed, associated properties will be replaced with the given properties. New groups will be added with the given properties.
    Parameters:
      `theGroup` - schema name
      `theProperties` - set of named graphs