AllMotechPermissions

public class AllMotechPermissions

Implementation of DAO interface that utilizes a MDS back-end for storage. Class responsible for handling MotechPermission.

Methods

add

public void add(MotechPermission permission)

Adds new MotechPermission and update Motech Admin role to contain it

Parameters:
  • permission – to be added

delete

public void delete(MotechPermission permission)

Deletes given MotechPermission

Parameters:
  • permission – to be removed

findByPermissionName

public MotechPermission findByPermissionName(String permissionName)

Returns MotechPermission with given name

Parameters:
  • permissionName – name of permission
Returns:

MotechPermission

getPermissions

public List<MotechPermission> getPermissions()

Returns all MotechPermissions

Returns:list that contains permissions

setAllMotechRoles

public void setAllMotechRoles(AllMotechRoles allMotechRoles)

setDataService

public void setDataService(MotechPermissionsDataService dataService)