Package dev.dsf.fhir.authorization
Class TaskAuthorizationRule
java.lang.Object
dev.dsf.fhir.authorization.AbstractAuthorizationRule<org.hl7.fhir.r4.model.Task,TaskDao>
dev.dsf.fhir.authorization.TaskAuthorizationRule
- All Implemented Interfaces:
AuthorizationRule<org.hl7.fhir.r4.model.Task>,org.springframework.beans.factory.InitializingBean
public class TaskAuthorizationRule
extends AbstractAuthorizationRule<org.hl7.fhir.r4.model.Task,TaskDao>
-
Field Summary
Fields inherited from class dev.dsf.fhir.authorization.AbstractAuthorizationRule
daoProvider, ORGANIZATION_IDENTIFIER_SYSTEM, organizationProvider, parameterConverter, readAccessHelper, referenceResolver, resourceType, serverBase -
Constructor Summary
ConstructorsConstructorDescriptionTaskAuthorizationRule(DaoProvider daoProvider, String serverBase, ReferenceResolver referenceResolver, OrganizationProvider organizationProvider, ReadAccessHelper readAccessHelper, ParameterConverter parameterConverter, ProcessAuthorizationHelper processAuthorizationHelper) -
Method Summary
Modifier and TypeMethodDescriptionvoidreasonCreateAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Task newResource) Override this method for non default behavior.reasonDeleteAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Task oldResource) Override this method for non default behavior.reasonReadAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Task existingResource) Override this method for non default behavior.reasonUpdateAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Task oldResource, org.hl7.fhir.r4.model.Task newResource) Override this method for non default behavior.Methods inherited from class dev.dsf.fhir.authorization.AbstractAuthorizationRule
createIfLiteralInternalOrLogicalReference, getAffiliations, getDao, getResourceType, getResourceTypeName, isCurrentIdentityPartOfReferencedOrganization, isCurrentIdentityPartOfReferencedOrganizations, isCurrentIdentityPartOfReferencedOrganizations, isLocalOrganization, organizationWithIdentifierExists, reasonCreateAllowed, reasonDeleteAllowed, reasonHistoryAllowed, reasonPermanentDeleteAllowed, reasonPermanentDeleteAllowed, reasonReadAllowed, reasonSearchAllowed, reasonUpdateAllowed, resolveReference, roleExists
-
Constructor Details
-
TaskAuthorizationRule
public TaskAuthorizationRule(DaoProvider daoProvider, String serverBase, ReferenceResolver referenceResolver, OrganizationProvider organizationProvider, ReadAccessHelper readAccessHelper, ParameterConverter parameterConverter, ProcessAuthorizationHelper processAuthorizationHelper)
-
-
Method Details
-
afterPropertiesSet
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Overrides:
afterPropertiesSetin classAbstractAuthorizationRule<org.hl7.fhir.r4.model.Task,TaskDao> - Throws:
Exception
-
reasonCreateAllowed
public Optional<String> reasonCreateAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Task newResource) Description copied from interface:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Parameters:
connection- notnullidentity- notnullnewResource- notnull- Returns:
- Reason as String in
Optional.of(Object)if create allowed
-
reasonReadAllowed
public Optional<String> reasonReadAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Task existingResource) Description copied from interface:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Parameters:
connection- notnullidentity- notnullexistingResource- notnull- Returns:
- Reason as String in
Optional.of(Object)if read allowed
-
reasonUpdateAllowed
public Optional<String> reasonUpdateAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Task oldResource, org.hl7.fhir.r4.model.Task newResource) Description copied from interface:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Parameters:
connection- notnullidentity- notnulloldResource- notnullnewResource- notnull- Returns:
- Reason as String in
Optional.of(Object)if update allowed
-
reasonDeleteAllowed
public Optional<String> reasonDeleteAllowed(Connection connection, Identity identity, org.hl7.fhir.r4.model.Task oldResource) Description copied from interface:AuthorizationRuleOverride this method for non default behavior. Default: Not allowed.- Parameters:
connection- notnullidentity- notnulloldResource- notnull- Returns:
- Reason as String in
Optional.of(Object)if delete allowed
-