Package dev.dsf.fhir.authorization
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<org.hl7.fhir.r4.model.Resource>reasonCreateAllowed(Identity identity, org.hl7.fhir.r4.model.Resource newResource) Override this method for non default behavior.reasonCreateAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Resource newResource) Override this method for non default behavior.reasonDeleteAllowed(Identity identity, org.hl7.fhir.r4.model.Resource oldResource) Override this method for non default behavior.reasonDeleteAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Resource oldResource) Override this method for non default behavior.reasonHistoryAllowed(Identity identity) Override this method for non default behavior.reasonPermanentDeleteAllowed(Identity identity, org.hl7.fhir.r4.model.Resource oldResource) Override this method for non default behavior.reasonPermanentDeleteAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Resource oldResource) Override this method for non default behavior.reasonReadAllowed(Identity identity, org.hl7.fhir.r4.model.Resource existingResource) Override this method for non default behavior.reasonReadAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Resource existingResource) Override this method for non default behavior.reasonSearchAllowed(Identity identity) Override this method for non default behavior.reasonUpdateAllowed(Identity identity, org.hl7.fhir.r4.model.Resource oldResource, org.hl7.fhir.r4.model.Resource newResource) Override this method for non default behavior.reasonUpdateAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Resource oldResource, org.hl7.fhir.r4.model.Resource newResource) Override this method for non default behavior.
-
Constructor Details
-
RootAuthorizationRule
public RootAuthorizationRule()
-
-
Method Details
-
getResourceType
- Specified by:
getResourceTypein interfaceAuthorizationRule<org.hl7.fhir.r4.model.Resource>
-
reasonCreateAllowed
public Optional<String> reasonCreateAllowed(Identity identity, org.hl7.fhir.r4.model.Resource newResource) Description copied from interface:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Specified by:
reasonCreateAllowedin interfaceAuthorizationRule<org.hl7.fhir.r4.model.Resource>- Parameters:
identity- notnullnewResource- notnull- 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:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Specified by:
reasonCreateAllowedin interfaceAuthorizationRule<org.hl7.fhir.r4.model.Resource>- Parameters:
connection- notnullidentity- notnullnewResource- notnull- 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:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Specified by:
reasonReadAllowedin interfaceAuthorizationRule<org.hl7.fhir.r4.model.Resource>- Parameters:
identity- notnullexistingResource- notnull- 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:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Specified by:
reasonReadAllowedin interfaceAuthorizationRule<org.hl7.fhir.r4.model.Resource>- Parameters:
connection- notnullidentity- notnullexistingResource- notnull- 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:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Specified by:
reasonUpdateAllowedin interfaceAuthorizationRule<org.hl7.fhir.r4.model.Resource>- Parameters:
identity- notnulloldResource- notnullnewResource- notnull- 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:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Specified by:
reasonUpdateAllowedin interfaceAuthorizationRule<org.hl7.fhir.r4.model.Resource>- Parameters:
connection- notnullidentity- notnulloldResource- notnullnewResource- notnull- 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:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Specified by:
reasonDeleteAllowedin interfaceAuthorizationRule<org.hl7.fhir.r4.model.Resource>- Parameters:
identity- notnulloldResource- notnull- 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:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Specified by:
reasonDeleteAllowedin interfaceAuthorizationRule<org.hl7.fhir.r4.model.Resource>- Parameters:
connection- notnullidentity- notnulloldResource- notnull- Returns:
- Reason as String in
Optional.of(Object)if delete allowed
-
reasonSearchAllowed
Description copied from interface:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Specified by:
reasonSearchAllowedin interfaceAuthorizationRule<org.hl7.fhir.r4.model.Resource>- Parameters:
identity- notnull- Returns:
- Reason as String in
Optional.of(Object)if delete allowed
-
reasonHistoryAllowed
Description copied from interface:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Specified by:
reasonHistoryAllowedin interfaceAuthorizationRule<org.hl7.fhir.r4.model.Resource>- Parameters:
identity- notnull- 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:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Specified by:
reasonPermanentDeleteAllowedin interfaceAuthorizationRule<org.hl7.fhir.r4.model.Resource>- Parameters:
identity- notnulloldResource- notnull- 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:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Specified by:
reasonPermanentDeleteAllowedin interfaceAuthorizationRule<org.hl7.fhir.r4.model.Resource>- Parameters:
connection- notnullidentity- notnulloldResource- notnull- Returns:
- Reason as String in
Optional.of(Object)if permanent delete allowed
-