org.kuali.hr.time.util
Class TKUser

java.lang.Object
  extended by org.kuali.hr.time.util.TKUser

public class TKUser
extends Object

This class houses the concept of a user in the Timekeeping system. It is essentially a lightweight wrapper around multiple KIM Person objects. One for the actual ACTUAL person One for the user the ACTUAL person is backdooring as: Back Door user is like doing 'su - ' in unix. You "become" that person, assume all of their roles, etc. One for the user the ACTUAL person is targeting: Targeting a user is being granted read/write access to the users data. See Javadocs for: getCurrentTargetPerson(), getCurrentPerson(), getActualPerson(), getBackdoorPerson(), getTargetPerson(). the getCurrent*() methods are most likely what you should be using in any end user display logic. The methods get[ABT]*() can return null.


Constructor Summary
TKUser()
           
 
Method Summary
static void clearTargetUser()
           
 Set<Long> getApproverWorkAreas()
           
static org.kuali.rice.kim.api.identity.Person getCurrentTargetPerson()
          Returns a Person object for the target person if present, otherwise the backdoor, and finally the actual.
static UserRoles getCurrentTargetRoles()
          Returns a UserRoles object for the target person if present, otherwise the backdoor, and finally the actual.
 Set<String> getDepartmentAdminAreas()
           
 Set<String> getLocationAdminAreas()
           
 com.google.common.collect.Multimap<String,Long> getReportingApprovalDepartments()
           
 Set<Long> getReportingWorkAreas()
           
 Set<Long> getReviewerWorkAreas()
           
static TKUser getUser(org.kuali.rice.kim.api.identity.Person target, Date asOfDate)
           
 SortedSet<Long> getWorkAreasFromUserRoles()
           
 boolean isActiveEmployee()
           
 boolean isAnyApproverActive()
           
 boolean isApprover()
           
 boolean isApproverForTimesheet(String docId)
           
 boolean isDepartmentAdmin()
           
 boolean isDeptViewOnly()
           
 boolean isDocumentReadable(String documentId)
           
 boolean isDocumentWritable(String documentId)
           
 boolean isGlobalViewOnly()
           
 boolean isLocationAdmin()
           
 boolean isReviewer()
           
 boolean isSynchronous()
           
 boolean isSystemAdmin()
           
static boolean isTargetInUse()
           
 boolean isTimesheetApprover()
           
 boolean isTimesheetReviewer()
           
static void setTargetPerson(org.kuali.rice.kim.api.identity.Person targetPerson)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TKUser

public TKUser()
Method Detail

setTargetPerson

public static void setTargetPerson(org.kuali.rice.kim.api.identity.Person targetPerson)

isTargetInUse

public static boolean isTargetInUse()

clearTargetUser

public static void clearTargetUser()

getCurrentTargetPerson

public static org.kuali.rice.kim.api.identity.Person getCurrentTargetPerson()
Returns a Person object for the target person if present, otherwise the backdoor, and finally the actual.

Returns:
A Person object: target > backdoor > actual.

getCurrentTargetRoles

public static UserRoles getCurrentTargetRoles()
Returns a UserRoles object for the target person if present, otherwise the backdoor, and finally the actual.

Returns:
A UserRoles object: target > backdoor > actual.

getUser

public static TKUser getUser(org.kuali.rice.kim.api.identity.Person target,
                             Date asOfDate)

isSystemAdmin

public boolean isSystemAdmin()

isLocationAdmin

public boolean isLocationAdmin()

isDepartmentAdmin

public boolean isDepartmentAdmin()

isGlobalViewOnly

public boolean isGlobalViewOnly()

isDeptViewOnly

public boolean isDeptViewOnly()

isActiveEmployee

public boolean isActiveEmployee()

isSynchronous

public boolean isSynchronous()

isReviewer

public boolean isReviewer()

isApprover

public boolean isApprover()

isTimesheetReviewer

public boolean isTimesheetReviewer()

isTimesheetApprover

public boolean isTimesheetApprover()

isAnyApproverActive

public boolean isAnyApproverActive()

isApproverForTimesheet

public boolean isApproverForTimesheet(String docId)

isDocumentReadable

public boolean isDocumentReadable(String documentId)

isDocumentWritable

public boolean isDocumentWritable(String documentId)

getReportingApprovalDepartments

public com.google.common.collect.Multimap<String,Long> getReportingApprovalDepartments()

getReportingWorkAreas

public Set<Long> getReportingWorkAreas()

getApproverWorkAreas

public Set<Long> getApproverWorkAreas()

getReviewerWorkAreas

public Set<Long> getReviewerWorkAreas()

getLocationAdminAreas

public Set<String> getLocationAdminAreas()

getDepartmentAdminAreas

public Set<String> getDepartmentAdminAreas()

getWorkAreasFromUserRoles

public SortedSet<Long> getWorkAreasFromUserRoles()


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