org.kuali.hr.time.roles.service
Class TkRoleServiceImpl

java.lang.Object
  extended by org.kuali.hr.time.roles.service.TkRoleServiceImpl
All Implemented Interfaces:
TkRoleService

public class TkRoleServiceImpl
extends Object
implements TkRoleService


Constructor Summary
TkRoleServiceImpl()
           
 
Method Summary
 Set<String> getActivePrinciaplsForWorkAreas(Set<Long> workAreas, Date asOfDate)
          Provides a unique set of principal ids that have active assignments in the given work areas.
 List<TkRole> getDepartmentInactiveRoles(String department, String roleName, Date asOfDate)
          Fetch all Inactive Roles for a given Department and Role Name as of a particular date
 List<TkRole> getDepartmentRoles(String department, Date asOfDate)
          Fetch all Roles for a given Department of a particular date
 List<TkRole> getDepartmentRoles(String department, String roleName, Date asOfDate)
          Fetch all Roles for a given Department and Role Name as of a particular date
 List<TKUser> getEmployeesForWorkArea(Long workArea, Date asOfDate)
           
 List<TkRole> getInactiveRoles(String principalId, Date asOfDate)
          Returns all active roles for the given principal as of the indi
 TkRole getInactiveRolesByPosition(String positionNumber)
           
 List<TkRole> getInActiveWorkAreaRoles(Long workArea, Date asOfDate)
          Fetch all Inactive Roles for a given work area as of a particular date
 List<TkRole> getInActiveWorkAreaRoles(Long workArea, String roleName, Date asOfDate)
          Fetch all Inactive Roles for a given work area and role name as of a particular date
 List<TkRole> getPositionRolesForWorkArea(Long workArea, Date asOfDate)
           
 List<String> getResponsibleParties(Assignment a, String roleName, Date asOfDate)
          Gets the list of principal IDs responsible for the provided assignment / role name combination.
 TkRole getRole(String tkRoleId)
          Fetches Role by primary key
 List<TkRole> getRoles(String principalId, Date asOfDate)
          Returns all active roles for the given principal as of the indi
 List<TkRole> getRoles(String principalId, Date asOfDate, String roleName, Long workArea, String department)
          Return a List of TkRoles that matches criteria.
 List<TkRole> getRoles(String principalId, String roleName, Date asOfDate)
          Return a List of TkRoles that match the principal ID and roleName.
 TkRole getRolesByPosition(String positionNumber)
          Fetches Role by position number
 List<TkRole> getWorkAreaRoles(Long workArea, Date asOfDate)
          Fetch all Roles for a given Work Area as of a particular date
 List<TkRole> getWorkAreaRoles(Long workArea, String roleName, Date asOfDate)
          Fetch all Roles for a given work area and role name as of a particular date
 Set<Long> getWorkAreasForApprover(String principalId, Date asOfDate)
          Provides a unique set of work areas that this user is an approver for.
 void saveOrUpdate(List<TkRole> roles)
          Save or Update a List of TkRole objects
 void saveOrUpdate(TkRole role)
          Save or Update a given TkRole
 void setTkRoleDao(TkRoleDao tkRoleDao)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TkRoleServiceImpl

public TkRoleServiceImpl()
Method Detail

getDepartmentRoles

public List<TkRole> getDepartmentRoles(String department,
                                       Date asOfDate)
Description copied from interface: TkRoleService
Fetch all Roles for a given Department of a particular date

Specified by:
getDepartmentRoles in interface TkRoleService
Returns:

getDepartmentRoles

public List<TkRole> getDepartmentRoles(String department,
                                       String roleName,
                                       Date asOfDate)
Description copied from interface: TkRoleService
Fetch all Roles for a given Department and Role Name as of a particular date

Specified by:
getDepartmentRoles in interface TkRoleService
Returns:

getDepartmentInactiveRoles

public List<TkRole> getDepartmentInactiveRoles(String department,
                                               String roleName,
                                               Date asOfDate)
Description copied from interface: TkRoleService
Fetch all Inactive Roles for a given Department and Role Name as of a particular date

Specified by:
getDepartmentInactiveRoles in interface TkRoleService
Returns:

getWorkAreaRoles

public List<TkRole> getWorkAreaRoles(Long workArea,
                                     Date asOfDate)
Description copied from interface: TkRoleService
Fetch all Roles for a given Work Area as of a particular date

Specified by:
getWorkAreaRoles in interface TkRoleService
Returns:

getWorkAreaRoles

public List<TkRole> getWorkAreaRoles(Long workArea,
                                     String roleName,
                                     Date asOfDate)
Description copied from interface: TkRoleService
Fetch all Roles for a given work area and role name as of a particular date

Specified by:
getWorkAreaRoles in interface TkRoleService
Returns:

getInActiveWorkAreaRoles

public List<TkRole> getInActiveWorkAreaRoles(Long workArea,
                                             Date asOfDate)
Description copied from interface: TkRoleService
Fetch all Inactive Roles for a given work area as of a particular date

Specified by:
getInActiveWorkAreaRoles in interface TkRoleService
Returns:

getInActiveWorkAreaRoles

public List<TkRole> getInActiveWorkAreaRoles(Long workArea,
                                             String roleName,
                                             Date asOfDate)
Description copied from interface: TkRoleService
Fetch all Inactive Roles for a given work area and role name as of a particular date

Specified by:
getInActiveWorkAreaRoles in interface TkRoleService
Returns:

setTkRoleDao

public void setTkRoleDao(TkRoleDao tkRoleDao)

saveOrUpdate

public void saveOrUpdate(List<TkRole> roles)
Description copied from interface: TkRoleService
Save or Update a List of TkRole objects

Specified by:
saveOrUpdate in interface TkRoleService

saveOrUpdate

public void saveOrUpdate(TkRole role)
Description copied from interface: TkRoleService
Save or Update a given TkRole

Specified by:
saveOrUpdate in interface TkRoleService

getRoles

public List<TkRole> getRoles(String principalId,
                             Date asOfDate)
Returns all active roles for the given principal as of the indi

Specified by:
getRoles in interface TkRoleService
Returns:

getInactiveRoles

public List<TkRole> getInactiveRoles(String principalId,
                                     Date asOfDate)
Returns all active roles for the given principal as of the indi

Specified by:
getInactiveRoles in interface TkRoleService
Returns:

getRoles

public List<TkRole> getRoles(String principalId,
                             String roleName,
                             Date asOfDate)
Return a List of TkRoles that match the principal ID and roleName. ex: admin,TK_APPROVER will return all TK_APPROVER roles for the user admin.

Specified by:
getRoles in interface TkRoleService
Returns:

getRoles

public List<TkRole> getRoles(String principalId,
                             Date asOfDate,
                             String roleName,
                             Long workArea,
                             String department)
Return a List of TkRoles that matches criteria.

Specified by:
getRoles in interface TkRoleService
Parameters:
principalId -
asOfDate -
roleName -
workArea -
department -
Returns:

getEmployeesForWorkArea

public List<TKUser> getEmployeesForWorkArea(Long workArea,
                                            Date asOfDate)

getResponsibleParties

public List<String> getResponsibleParties(Assignment a,
                                          String roleName,
                                          Date asOfDate)
Description copied from interface: TkRoleService
Gets the list of principal IDs responsible for the provided assignment / role name combination.

Specified by:
getResponsibleParties in interface TkRoleService
Parameters:
a - the assignment to query
roleName - The role we are interested in.
asOfDate - effective date
Returns:

getWorkAreasForApprover

public Set<Long> getWorkAreasForApprover(String principalId,
                                         Date asOfDate)
Description copied from interface: TkRoleService
Provides a unique set of work areas that this user is an approver for.

Specified by:
getWorkAreasForApprover in interface TkRoleService
Parameters:
principalId - The principal to retrieve roles for.
asOfDate - effective date
Returns:
A Set of Long work area numbers.

getActivePrinciaplsForWorkAreas

public Set<String> getActivePrinciaplsForWorkAreas(Set<Long> workAreas,
                                                   Date asOfDate)
Description copied from interface: TkRoleService
Provides a unique set of principal ids that have active assignments in the given work areas.

Specified by:
getActivePrinciaplsForWorkAreas in interface TkRoleService
Parameters:
workAreas - A set of work area numbers.
asOfDate - effective date
Returns:
A Set of String principal IDs.

getRole

public TkRole getRole(String tkRoleId)
Description copied from interface: TkRoleService
Fetches Role by primary key

Specified by:
getRole in interface TkRoleService

getRolesByPosition

public TkRole getRolesByPosition(String positionNumber)
Description copied from interface: TkRoleService
Fetches Role by position number

Specified by:
getRolesByPosition in interface TkRoleService

getInactiveRolesByPosition

public TkRole getInactiveRolesByPosition(String positionNumber)
Specified by:
getInactiveRolesByPosition in interface TkRoleService

getPositionRolesForWorkArea

public List<TkRole> getPositionRolesForWorkArea(Long workArea,
                                                Date asOfDate)
Specified by:
getPositionRolesForWorkArea in interface TkRoleService


Copyright © 2004-2012 The Kuali Foundation. All Rights Reserved.