Class AuditedDataSubject

java.lang.Object
com.sap.cloud.sdk.cloudplatform.auditlog.AuditedDataSubject

public class AuditedDataSubject extends Object
This class stores auditing information about who owns the data. Fields should be set such that from the audit log entry, one can identify the owner of the accessed data.
  • Constructor Details

    • AuditedDataSubject

      public AuditedDataSubject(@Nonnull String type, @Nonnull String role)
      Creates an audited data subject instance with provided type and role and randomly generated identifier.
      Parameters:
      type - The type of owner for the data (e.g. person, company, ...).
      role - The role of the owner for the data (e.g. administrator, controller, ...).
    • AuditedDataSubject

      public AuditedDataSubject(@Nonnull String type, @Nonnull String role, @Nonnull String id)
      Creates an audited data subject instance with provided type, role and identifier.
      Parameters:
      type - The type of owner for the data (e.g. person, company, ...).
      role - The role of the owner for the data (e.g. administrator, controller, ...).
      id - The identifier value for property "AuditedDataObject".
  • Method Details

    • setIdentifier

      public void setIdentifier(@Nonnull String propertyName, @Nullable String value)
      Sets a property that identifies the data owner. Entries can be overwritten if the same propertyName is passed in.
      Parameters:
      propertyName - Name of the property.
      value - Value of the property.
    • getIdentifier

      @Nullable public String getIdentifier(@Nonnull String propertyName)
      Gets the value of a property that identifies the data owner.
      Parameters:
      propertyName - Name of the property.
      Returns:
      Value of the property.
    • getAllIdentifiers

      @Nonnull public Map<String,String> getAllIdentifiers()
      Gets all properties that identify the data owner.
      Returns:
      Map of name-value pairs.
    • getType

      public String getType()
      This represents the type of owner for the data (e.g. person, company, ...).
    • setType

      public void setType(String type)
      This represents the type of owner for the data (e.g. person, company, ...).
    • getRole

      public String getRole()
      This represents the role of the owner for the data (e.g. administrator, controller, ...).
    • setRole

      public void setRole(String role)
      This represents the role of the owner for the data (e.g. administrator, controller, ...).