ca.bc.gov.webade.user
Interface WebADEUserPermissions

All Known Subinterfaces:
WebADECurrentUserPermissions
All Known Implementing Classes:
DefaultWebADECurrentUserPermissions, DefaultWebADEUserPermissions

public interface WebADEUserPermissions

Author:
jross

Method Summary
 boolean canPerformAction(Action action)
          Returns a boolean indicating whether a user is authorized to perform action.
 Organization[] getGovernmentOrganizations()
          Returns the Government Organizations a user has access to.
 Organization[] getNonGovernmentOrganizations()
          Returns the Non-Government Organizations a user has access to.
 Organization[] getOrganizations()
           
 Role[] getRoles()
           
 Role[] getRolesByOrganization(Organization targetOrg)
          Returns the set of roles assigned to the user by the given organization.
 Role[] getRolesNotSecuredByOrganization()
          Returns the set of roles assigned to the user that are not secured by organization.
 Organization getSelectedOrganization()
           
 UserCredentials getUserCredentials()
           
 boolean isUserInOrganization(Organization org)
          Returns a boolean indicating whether a user is authorized to act on behalf of an Organization.
 boolean isUserInRole(Role role)
          Returns a boolean indicating whether a user is authorized to act in the given role.
 void setSelectedOrganization(Organization selectedOrg)
          Sets the selected organization.
 

Method Detail

getUserCredentials

public UserCredentials getUserCredentials()
Returns:
Returns the associated user's credentials.

getOrganizations

public Organization[] getOrganizations()
Returns:
Returns the orgs.

getRoles

public Role[] getRoles()
Returns:
Returns the roles.

getRolesNotSecuredByOrganization

public Role[] getRolesNotSecuredByOrganization()
Returns the set of roles assigned to the user that are not secured by organization.

Returns:
Returns the nonsecured by organization roles assigned to the user.

getRolesByOrganization

public Role[] getRolesByOrganization(Organization targetOrg)
Returns the set of roles assigned to the user by the given organization.

Parameters:
targetOrg - The target organization.
Returns:
Returns the roles assigned to the user for that orgzniation.

isUserInRole

public boolean isUserInRole(Role role)
Returns a boolean indicating whether a user is authorized to act in the given role.

Parameters:
role - the name of a role
Returns:
true if the user is authorized to act in the role

canPerformAction

public boolean canPerformAction(Action action)
Returns a boolean indicating whether a user is authorized to perform action.

Parameters:
action - the target action
Returns:
true if the user is authorized to perform action

getSelectedOrganization

public Organization getSelectedOrganization()
Returns:
Returns the selected organization.

setSelectedOrganization

public void setSelectedOrganization(Organization selectedOrg)
Sets the selected organization.

Parameters:
selectedOrg - The selected organization.

getGovernmentOrganizations

public Organization[] getGovernmentOrganizations()
Returns the Government Organizations a user has access to.

Returns:
The set of organizations this user is assigned to

getNonGovernmentOrganizations

public Organization[] getNonGovernmentOrganizations()
Returns the Non-Government Organizations a user has access to.

Returns:
The set of organizations this user is assigned to

isUserInOrganization

public boolean isUserInOrganization(Organization org)
Returns a boolean indicating whether a user is authorized to act on behalf of an Organization.

Parameters:
org - the name of an organization
Returns:
true if the user is authorized access Org Unit