001 /**
002 * Copyright 2004-2013 The Kuali Foundation
003 *
004 * Licensed under the Educational Community License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.opensource.org/licenses/ecl2.php
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016 package org.kuali.hr.time.permissions;
017
018 import org.kuali.hr.lm.leaveblock.LeaveBlock;
019 import org.kuali.hr.time.authorization.DepartmentalRule;
020 import org.kuali.hr.time.timeblock.TimeBlock;
021 import org.kuali.hr.time.timesheet.TimesheetDocument;
022
023
024
025 public interface TkPermissionsService {
026
027 public boolean canAddTimeBlock();
028 public boolean canEditTimeBlockAllFields(TimeBlock tb);
029 public boolean canEditTimeBlock(TimeBlock tb);
030 public boolean canDeleteTimeBlock(TimeBlock tb);
031 public boolean canEditLeaveBlock(LeaveBlock lb);
032 public boolean canDeleteLeaveBlock(LeaveBlock lb);
033 public boolean canViewAdminTab();
034 public boolean canViewClockTab();
035 public boolean canViewApproverTab();
036 public boolean canViewTimeDetailTab();
037 public boolean canViewBatchJobsTab();
038 public boolean canViewPersonInfoTab();
039 public boolean canViewLeaveAccrualTab();
040 public boolean canViewTimesheet(TimesheetDocument doc);
041 public boolean canViewTimesheet(String documentId);
042 public boolean canEditTimesheet(TimesheetDocument doc);
043 public boolean canEditTimesheet(String documentId);
044 public boolean canSubmitTimesheet(TimesheetDocument doc);
045 public boolean canSubmitTimesheet(String docId);
046 public boolean canApproveTimesheet(TimesheetDocument doc);
047 public boolean canViewLinkOnMaintPages();
048 public boolean canViewDeptMaintPages();
049 public boolean canViewDeptMaintPages(DepartmentalRule dr);
050 public boolean canEditDeptMaintPages();
051 public boolean canEditDeptMaintPages(DepartmentalRule dr);
052 public boolean canWildcardWorkAreaInDeptRule(DepartmentalRule dr);
053 public boolean canWildcardDeptInDeptRule(DepartmentalRule dr);
054 public boolean canEditOvertimeEarnCode(TimeBlock tb);
055 public boolean canEditRegEarnCode(TimeBlock tb);
056 public boolean canDeleteDeptLunchDeduction();
057 public boolean canAddSystemLevelRole();
058 public boolean canAddLocationLevelRoles();
059 public boolean canAddDepartmentLevelRoles();
060 public boolean canAddWorkareaLevelRoles();
061 public boolean canViewTimeTabs();
062 public boolean canViewLeaveTabsWithEStatus();
063 public boolean canViewLeaveTabsWithNEStatus();
064 /**
065 * Determine if given leave block is a accrual generated System Scheduled Timeoff usage that can be banked/transferred
066 * and if the leave block is on the current leave calendar entry of the current targeted user
067 * @param lb
068 * @return
069 */
070 public boolean canBankOrTransferSSTOUsage(LeaveBlock lb);
071 /**
072 * Determine if given leave block is a accrual generated System Scheduled Timeoff usage that can be transferred
073 * and if the leave block is on the current leave calendar entry of the current targeted user
074 * @param lb
075 * @return
076 */
077 public boolean canTransferSSTOUsage(LeaveBlock lb);
078 /**
079 * Determine if given leave block is a accrual generated System Scheduled Timeoff usage that can be banked
080 * and if the leave block is on the current leave calendar entry of the current targeted user
081 * @param lb
082 * @return
083 */
084 public boolean canBankSSTOUsage(LeaveBlock lb);
085 }