Class RootAuthorizationRule

java.lang.Object
dev.dsf.fhir.authorization.RootAuthorizationRule
All Implemented Interfaces:
AuthorizationRule<org.hl7.fhir.r4.model.Resource>

public class RootAuthorizationRule extends Object implements AuthorizationRule<org.hl7.fhir.r4.model.Resource>
  • Constructor Details

    • RootAuthorizationRule

      public RootAuthorizationRule()
  • Method Details

    • getResourceType

      public Class<org.hl7.fhir.r4.model.Resource> getResourceType()
      Specified by:
      getResourceType in interface AuthorizationRule<org.hl7.fhir.r4.model.Resource>
    • reasonCreateAllowed

      public Optional<String> reasonCreateAllowed(Identity identity, org.hl7.fhir.r4.model.Resource newResource)
      Description copied from interface: AuthorizationRule
      Override this method for non default behavior. Default: Not allowed.
      Specified by:
      reasonCreateAllowed in interface AuthorizationRule<org.hl7.fhir.r4.model.Resource>
      Parameters:
      identity - not null
      newResource - not null
      Returns:
      Reason as String in Optional.of(Object) if create allowed
    • reasonCreateAllowed

      public Optional<String> reasonCreateAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Resource newResource)
      Description copied from interface: AuthorizationRule
      Override this method for non default behavior. Default: Not allowed.
      Specified by:
      reasonCreateAllowed in interface AuthorizationRule<org.hl7.fhir.r4.model.Resource>
      Parameters:
      connection - not null
      identity - not null
      newResource - not null
      Returns:
      Reason as String in Optional.of(Object) if create allowed
    • reasonReadAllowed

      public Optional<String> reasonReadAllowed(Identity identity, org.hl7.fhir.r4.model.Resource existingResource)
      Description copied from interface: AuthorizationRule
      Override this method for non default behavior. Default: Not allowed.
      Specified by:
      reasonReadAllowed in interface AuthorizationRule<org.hl7.fhir.r4.model.Resource>
      Parameters:
      identity - not null
      existingResource - not null
      Returns:
      Reason as String in Optional.of(Object) if read allowed
    • reasonReadAllowed

      public Optional<String> reasonReadAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Resource existingResource)
      Description copied from interface: AuthorizationRule
      Override this method for non default behavior. Default: Not allowed.
      Specified by:
      reasonReadAllowed in interface AuthorizationRule<org.hl7.fhir.r4.model.Resource>
      Parameters:
      connection - not null
      identity - not null
      existingResource - not null
      Returns:
      Reason as String in Optional.of(Object) if read allowed
    • reasonUpdateAllowed

      public Optional<String> reasonUpdateAllowed(Identity identity, org.hl7.fhir.r4.model.Resource oldResource, org.hl7.fhir.r4.model.Resource newResource)
      Description copied from interface: AuthorizationRule
      Override this method for non default behavior. Default: Not allowed.
      Specified by:
      reasonUpdateAllowed in interface AuthorizationRule<org.hl7.fhir.r4.model.Resource>
      Parameters:
      identity - not null
      oldResource - not null
      newResource - not null
      Returns:
      Reason as String in Optional.of(Object) if update allowed
    • reasonUpdateAllowed

      public Optional<String> reasonUpdateAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Resource oldResource, org.hl7.fhir.r4.model.Resource newResource)
      Description copied from interface: AuthorizationRule
      Override this method for non default behavior. Default: Not allowed.
      Specified by:
      reasonUpdateAllowed in interface AuthorizationRule<org.hl7.fhir.r4.model.Resource>
      Parameters:
      connection - not null
      identity - not null
      oldResource - not null
      newResource - not null
      Returns:
      Reason as String in Optional.of(Object) if update allowed
    • reasonDeleteAllowed

      public Optional<String> reasonDeleteAllowed(Identity identity, org.hl7.fhir.r4.model.Resource oldResource)
      Description copied from interface: AuthorizationRule
      Override this method for non default behavior. Default: Not allowed.
      Specified by:
      reasonDeleteAllowed in interface AuthorizationRule<org.hl7.fhir.r4.model.Resource>
      Parameters:
      identity - not null
      oldResource - not null
      Returns:
      Reason as String in Optional.of(Object) if delete allowed
    • reasonDeleteAllowed

      public Optional<String> reasonDeleteAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Resource oldResource)
      Description copied from interface: AuthorizationRule
      Override this method for non default behavior. Default: Not allowed.
      Specified by:
      reasonDeleteAllowed in interface AuthorizationRule<org.hl7.fhir.r4.model.Resource>
      Parameters:
      connection - not null
      identity - not null
      oldResource - not null
      Returns:
      Reason as String in Optional.of(Object) if delete allowed
    • reasonSearchAllowed

      public Optional<String> reasonSearchAllowed(Identity identity)
      Description copied from interface: AuthorizationRule
      Override this method for non default behavior. Default: Not allowed.
      Specified by:
      reasonSearchAllowed in interface AuthorizationRule<org.hl7.fhir.r4.model.Resource>
      Parameters:
      identity - not null
      Returns:
      Reason as String in Optional.of(Object) if delete allowed
    • reasonHistoryAllowed

      public Optional<String> reasonHistoryAllowed(Identity identity)
      Description copied from interface: AuthorizationRule
      Override this method for non default behavior. Default: Not allowed.
      Specified by:
      reasonHistoryAllowed in interface AuthorizationRule<org.hl7.fhir.r4.model.Resource>
      Parameters:
      identity - not null
      Returns:
      Reason as String in Optional.of(Object) if delete allowed
    • reasonPermanentDeleteAllowed

      public Optional<String> reasonPermanentDeleteAllowed(Identity identity, org.hl7.fhir.r4.model.Resource oldResource)
      Description copied from interface: AuthorizationRule
      Override this method for non default behavior. Default: Not allowed.
      Specified by:
      reasonPermanentDeleteAllowed in interface AuthorizationRule<org.hl7.fhir.r4.model.Resource>
      Parameters:
      identity - not null
      oldResource - not null
      Returns:
      Reason as String in Optional.of(Object) if permanent delete allowed
    • reasonPermanentDeleteAllowed

      public Optional<String> reasonPermanentDeleteAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Resource oldResource)
      Description copied from interface: AuthorizationRule
      Override this method for non default behavior. Default: Not allowed.
      Specified by:
      reasonPermanentDeleteAllowed in interface AuthorizationRule<org.hl7.fhir.r4.model.Resource>
      Parameters:
      connection - not null
      identity - not null
      oldResource - not null
      Returns:
      Reason as String in Optional.of(Object) if permanent delete allowed