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()
           
static 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 String getCurrentTargetPersonId()
          Returns a principal id 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.
static Set<String> getDepartmentAdminAreas()
           
static Set<String> getLocationAdminAreas()
           
static com.google.common.collect.Multimap<String,Long> getReportingApprovalDepartments()
           
static Set<Long> getReportingWorkAreas()
           
static Set<Long> getReviewerWorkAreas()
           
static SortedSet<Long> getWorkAreasFromUserRoles()
           
static boolean isActiveEmployee()
           
static boolean isAnyApproverActive()
           
static boolean isApprover()
           
static boolean isApproverForTimesheet(String docId)
           
static boolean isDepartmentAdmin()
           
static boolean isDeptViewOnly()
           
static boolean isDocumentReadable(String documentId)
           
static boolean isDocumentWritable(String documentId)
           
static boolean isGlobalViewOnly()
           
static boolean isLocationAdmin()
           
static boolean isReviewer()
           
static boolean isSynchronous()
           
static boolean isSystemAdmin()
           
static boolean isTargetInUse()
           
static boolean isTimesheetApprover()
           
static boolean isTimesheetReviewer()
           
static void setTargetPerson(String principalId)
           
 
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(String principalId)

isTargetInUse

public static boolean isTargetInUse()

clearTargetUser

public static void clearTargetUser()

getCurrentTargetPersonId

public static String getCurrentTargetPersonId()
Returns a principal id for the target person if present, otherwise the backdoor, and finally the actual.

Returns:
A principalId: target > backdoor > actual.

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.

isSystemAdmin

public static boolean isSystemAdmin()

isLocationAdmin

public static boolean isLocationAdmin()

isDepartmentAdmin

public static boolean isDepartmentAdmin()

isGlobalViewOnly

public static boolean isGlobalViewOnly()

isDeptViewOnly

public static boolean isDeptViewOnly()

isActiveEmployee

public static boolean isActiveEmployee()

isSynchronous

public static boolean isSynchronous()

isReviewer

public static boolean isReviewer()

isApprover

public static boolean isApprover()

isTimesheetReviewer

public static boolean isTimesheetReviewer()

isTimesheetApprover

public static boolean isTimesheetApprover()

isAnyApproverActive

public static boolean isAnyApproverActive()

isApproverForTimesheet

public static boolean isApproverForTimesheet(String docId)

isDocumentReadable

public static boolean isDocumentReadable(String documentId)

isDocumentWritable

public static boolean isDocumentWritable(String documentId)

getReportingApprovalDepartments

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

getReportingWorkAreas

public static Set<Long> getReportingWorkAreas()

getApproverWorkAreas

public static Set<Long> getApproverWorkAreas()

getReviewerWorkAreas

public static Set<Long> getReviewerWorkAreas()

getLocationAdminAreas

public static Set<String> getLocationAdminAreas()

getDepartmentAdminAreas

public static Set<String> getDepartmentAdminAreas()

getWorkAreasFromUserRoles

public static SortedSet<Long> getWorkAreasFromUserRoles()


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