Interface AuthorizationRule<R extends org.hl7.fhir.r4.model.Resource>

All Known Implementing Classes:
AbstractAuthorizationRule, AbstractMetaTagAuthorizationRule, ActivityDefinitionAuthorizationRule, BinaryAuthorizationRule, BundleAuthorizationRule, CodeSystemAuthorizationRule, DocumentReferenceAuthorizationRule, EndpointAuthorizationRule, GroupAuthorizationRule, HealthcareServiceAuthorizationRule, LibraryAuthorizationRule, LocationAuthorizationRule, MeasureAuthorizationRule, MeasureReportAuthorizationRule, NamingSystemAuthorizationRule, OrganizationAffiliationAuthorizationRule, OrganizationAuthorizationRule, PatientAuthorizationRule, PractitionerAuthorizationRule, PractitionerRoleAuthorizationRule, ProvenanceAuthorizationRule, QuestionnaireAuthorizationRule, QuestionnaireResponseAuthorizationRule, ResearchStudyAuthorizationRule, RootAuthorizationRule, StructureDefinitionAuthorizationRule, SubscriptionAuthorizationRule, TaskAuthorizationRule, ValueSetAuthorizationRule

public interface AuthorizationRule<R extends org.hl7.fhir.r4.model.Resource>
  • Method Details

    • getResourceType

      Class<R> getResourceType()
    • reasonCreateAllowed

      Optional<String> reasonCreateAllowed(Identity identity, R newResource)
      Override this method for non default behavior. Default: Not allowed.
      Parameters:
      identity - not null
      newResource - not null
      Returns:
      Reason as String in Optional.of(Object) if create allowed
    • reasonCreateAllowed

      Optional<String> reasonCreateAllowed(Connection connection, Identity identity, R newResource)
      Override this method for non default behavior. Default: Not allowed.
      Parameters:
      connection - not null
      identity - not null
      newResource - not null
      Returns:
      Reason as String in Optional.of(Object) if create allowed
    • reasonReadAllowed

      Optional<String> reasonReadAllowed(Identity identity, R existingResource)
      Override this method for non default behavior. Default: Not allowed.
      Parameters:
      identity - not null
      existingResource - not null
      Returns:
      Reason as String in Optional.of(Object) if read allowed
    • reasonReadAllowed

      Optional<String> reasonReadAllowed(Connection connection, Identity identity, R existingResource)
      Override this method for non default behavior. Default: Not allowed.
      Parameters:
      connection - not null
      identity - not null
      existingResource - not null
      Returns:
      Reason as String in Optional.of(Object) if read allowed
    • reasonUpdateAllowed

      Optional<String> reasonUpdateAllowed(Identity identity, R oldResource, R newResource)
      Override this method for non default behavior. Default: Not allowed.
      Parameters:
      identity - not null
      oldResource - not null
      newResource - not null
      Returns:
      Reason as String in Optional.of(Object) if update allowed
    • reasonUpdateAllowed

      Optional<String> reasonUpdateAllowed(Connection connection, Identity identity, R oldResource, R newResource)
      Override this method for non default behavior. Default: Not allowed.
      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

      Optional<String> reasonDeleteAllowed(Identity identity, R oldResource)
      Override this method for non default behavior. Default: Not allowed.
      Parameters:
      identity - not null
      oldResource - not null
      Returns:
      Reason as String in Optional.of(Object) if delete allowed
    • reasonDeleteAllowed

      Optional<String> reasonDeleteAllowed(Connection connection, Identity identity, R oldResource)
      Override this method for non default behavior. Default: Not allowed.
      Parameters:
      connection - not null
      identity - not null
      oldResource - not null
      Returns:
      Reason as String in Optional.of(Object) if delete allowed
    • reasonSearchAllowed

      Optional<String> reasonSearchAllowed(Identity identity)
      Override this method for non default behavior. Default: Not allowed.
      Parameters:
      identity - not null
      Returns:
      Reason as String in Optional.of(Object) if delete allowed
    • reasonHistoryAllowed

      Optional<String> reasonHistoryAllowed(Identity identity)
      Override this method for non default behavior. Default: Not allowed.
      Parameters:
      identity - not null
      Returns:
      Reason as String in Optional.of(Object) if delete allowed
    • reasonPermanentDeleteAllowed

      Optional<String> reasonPermanentDeleteAllowed(Identity identity, R oldResource)
      Override this method for non default behavior. Default: Not allowed.
      Parameters:
      identity - not null
      oldResource - not null
      Returns:
      Reason as String in Optional.of(Object) if permanent delete allowed
    • reasonPermanentDeleteAllowed

      Optional<String> reasonPermanentDeleteAllowed(Connection connection, Identity identity, R oldResource)
      Override this method for non default behavior. Default: Not allowed.
      Parameters:
      connection - not null
      identity - not null
      oldResource - not null
      Returns:
      Reason as String in Optional.of(Object) if permanent delete allowed