@Override protected void addRoleQualification(Object dataObject, Map<String, String> attributes) { super.addRoleQualification(dataObject, attributes); if ( (dataObject instanceof PositionBo) || (dataObject instanceof PositionContract) || (dataObject instanceof Position)) { PositionBo positionObj = (PositionBo) dataObject; if (positionObj != null) { Department departmentObj = HrServiceLocator.getDepartmentService().getDepartment(positionObj.getPrimaryDepartment(), positionObj.getGroupKeyCode(), positionObj.getEffectiveLocalDate()); if (departmentObj != null) { attributes.put(KPMERoleMemberAttribute.INSTITUION.getRoleMemberAttributeName(), departmentObj.getGroupKey().getInstitutionCode()); attributes.put(KPMERoleMemberAttribute.DEPARTMENT.getRoleMemberAttributeName(), departmentObj.getDept()); attributes.put(KPMERoleMemberAttribute.LOCATION.getRoleMemberAttributeName(), departmentObj.getGroupKey().getLocationId()); attributes.put(KPMERoleMemberAttribute.ORGANIZATION.getRoleMemberAttributeName(), departmentObj.getOrg()); attributes.put(KPMERoleMemberAttribute.GROUP_KEY_CODE.getRoleMemberAttributeName(), departmentObj.getGroupKeyCode()); } else { attributes.put(KPMERoleMemberAttribute.INSTITUION.getRoleMemberAttributeName(), "%"); attributes.put(KPMERoleMemberAttribute.DEPARTMENT.getRoleMemberAttributeName(), "%"); attributes.put(KPMERoleMemberAttribute.LOCATION.getRoleMemberAttributeName(), "%"); attributes.put(KPMERoleMemberAttribute.ORGANIZATION.getRoleMemberAttributeName(), "%"); attributes.put(KPMERoleMemberAttribute.GROUP_KEY_CODE.getRoleMemberAttributeName(), "%"); } } } }
public Department build() { return new Department(this); }
public String getBusinessKeyString() { return getGroupKeyCode() + "|" + getDept(); }
public List<ClockLocationRule> getClockLocationRules(String userPrincipalId, List <ClockLocationRule> clockLocationRuleObjs) { List<ClockLocationRule> results = new ArrayList<ClockLocationRule>(); if ( clockLocationRuleObjs != null ){ for (ClockLocationRule clockLocationRuleObj : clockLocationRuleObjs) { String department = clockLocationRuleObj.getDept(); Department departmentObj = HrServiceLocator.getDepartmentService().getDepartment(department, clockLocationRuleObj.getGroupKeyCode(), clockLocationRuleObj.getEffectiveLocalDate()); String location = departmentObj != null ? departmentObj.getGroupKey().getLocationId() : null; String groupKeyCode = departmentObj != null ? departmentObj.getGroupKeyCode() : null; Map<String, String> roleQualification = new HashMap<String, String>(); roleQualification.put(KimConstants.AttributeConstants.PRINCIPAL_ID, userPrincipalId); roleQualification.put(KPMERoleMemberAttribute.DEPARTMENT.getRoleMemberAttributeName(), department); roleQualification.put(KPMERoleMemberAttribute.GROUP_KEY_CODE.getRoleMemberAttributeName(), groupKeyCode); roleQualification.put(KPMERoleMemberAttribute.LOCATION.getRoleMemberAttributeName(), location); if (!KimApiServiceLocator.getPermissionService().isPermissionDefinedByTemplate(KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), new HashMap<String, String>()) || KimApiServiceLocator.getPermissionService().isAuthorizedByTemplate(userPrincipalId, KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), new HashMap<String, String>(), roleQualification)) { results.add(clockLocationRuleObj); } } } return results; } }
protected List<ClockLogBo> filterLookupResults(List<ClockLogBo> rawResults, String userPrincipalId) { List<ClockLogBo> results = new ArrayList<ClockLogBo>(); for (ClockLogBo clockLogObj : rawResults) { String department = clockLogObj.getDept(); String groupKeyCode = clockLogObj.getGroupKeyCode(); Department departmentObj = HrServiceLocator.getDepartmentService().getDepartment(department, groupKeyCode, clockLogObj.getClockDateTime().toLocalDate()); String location = departmentObj != null ? departmentObj.getGroupKey().getLocationId() : null; Map<String, String> roleQualification = new HashMap<String, String>(); roleQualification.put(KimConstants.AttributeConstants.PRINCIPAL_ID, userPrincipalId); roleQualification.put(KPMERoleMemberAttribute.DEPARTMENT.getRoleMemberAttributeName(), department); roleQualification.put(KPMERoleMemberAttribute.GROUP_KEY_CODE.getRoleMemberAttributeName(), groupKeyCode); roleQualification.put(KPMERoleMemberAttribute.LOCATION.getRoleMemberAttributeName(), location); if (!KimApiServiceLocator.getPermissionService().isPermissionDefinedByTemplate(KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), new HashMap<String, String>()) || KimApiServiceLocator.getPermissionService().isAuthorizedByTemplate(userPrincipalId, KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), new HashMap<String, String>(), roleQualification)) { results.add(clockLogObj); } } return results; }
if(aDept != null) { if(HrServiceLocator.getKPMERoleService().principalHasRoleInLocation(principalId, KPMENamespace.KPME_LM.getNamespaceCode(), KPMERole.LEAVE_LOCATION_ADMINISTRATOR.getRoleName(), aDept.getGroupKey().getLocationId(), LocalDate.now().toDateTimeAtStartOfDay())) return true; if(HrServiceLocator.getKPMERoleService().principalHasRoleInDepartment(principalId, KPMENamespace.KPME_HR.getNamespaceCode(), KPMERole.PAYROLL_PROCESSOR.getRoleName(), aDept.getDept(), aDept.getGroupKeyCode(), LocalDate.now().toDateTimeAtStartOfDay())) { return true; if(HrServiceLocator.getKPMERoleService().principalHasRoleInDepartment(principalId, KPMENamespace.KPME_HR.getNamespaceCode(), KPMERole.PAYROLL_PROCESSOR_DELEGATE.getRoleName(), aDept.getDept(), aDept.getGroupKeyCode(), LocalDate.now().toDateTimeAtStartOfDay())) { return true;
department.getOrg())); Department department = HrServiceLocator.getDepartmentService().getDepartment(position.getPrimaryDepartment(),position.getGroupKeyCode(),position.getEffectiveLocalDate()); orgQualifiers.add( Collections.singletonMap(KPMERoleMemberAttribute.ORGANIZATION.getRoleMemberAttributeName(), String.valueOf(department.getOrg()))); Department department = HrServiceLocator.getDepartmentService().getDepartment(((PositionBo)doc).getPrimaryDepartment(),((PositionBo)doc).getGroupKeyCode(),((PositionBo)doc).getEffectiveLocalDate()); orgQualifiers.add( Collections.singletonMap(KPMERoleMemberAttribute.ORGANIZATION.getRoleMemberAttributeName(), String.valueOf(department.getOrg())));
@Override public void addFacts(Facts.Builder factsBuilder, Object factObject, String contextId, String namespace) { addObjectMembersAsFacts(factsBuilder, factObject, contextId, namespace); factsBuilder.addFact(new Term("payrollProcessorApproval"), Boolean.FALSE); if (factObject != null && factObject instanceof Assignable) { Assignable assignable = (Assignable)factObject; factsBuilder.addFact(Assignable.ASSIGNABLE_TERM_NAME, assignable); Set<String> workAreas = new HashSet<String>(); Set<String> depts = new HashSet<String>(); for (Assignment a : assignable.getAssignments()) { workAreas.add(String.valueOf(a.getWorkArea())); depts.add(a.getDept()); Department department = HrServiceLocator.getDepartmentService().getDepartment(a.getDept(), a.getGroupKeyCode(), a.getEffectiveLocalDate()); if (department != null && department.isPayrollApproval()) { factsBuilder.addFact(new Term("payrollProcessorApproval"), Boolean.TRUE); } } if (CollectionUtils.isNotEmpty(depts)) { factsBuilder.addFact("department", depts); } if (CollectionUtils.isNotEmpty(workAreas)) { factsBuilder.addFact("workarea", workAreas); } } } }
public List<DailyOvertimeRule> getDailyOvertimeRules(String userPrincipalId, List <DailyOvertimeRule> dailyOvertimeRuleObjs){ List<DailyOvertimeRule> results = new ArrayList<DailyOvertimeRule>(); if ( dailyOvertimeRuleObjs != null ){ for (DailyOvertimeRule dailyOvertimeRuleObj : dailyOvertimeRuleObjs) { String department = dailyOvertimeRuleObj.getDept(); String groupKeyCd = dailyOvertimeRuleObj.getGroupKeyCode(); Department departmentObj = HrServiceLocator.getDepartmentService().getDepartment(department, groupKeyCd, dailyOvertimeRuleObj.getEffectiveLocalDate()); String loc = departmentObj != null ? departmentObj.getGroupKey().getLocationId() : null; Map<String, String> roleQualification = new HashMap<String, String>(); roleQualification.put(KimConstants.AttributeConstants.PRINCIPAL_ID, userPrincipalId); roleQualification.put(KPMERoleMemberAttribute.DEPARTMENT.getRoleMemberAttributeName(), department); roleQualification.put(KPMERoleMemberAttribute.GROUP_KEY_CODE.getRoleMemberAttributeName(), groupKeyCd); roleQualification.put(KPMERoleMemberAttribute.LOCATION.getRoleMemberAttributeName(), loc); if (!KimApiServiceLocator.getPermissionService().isPermissionDefinedByTemplate(KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), new HashMap<String, String>()) || KimApiServiceLocator.getPermissionService().isAuthorizedByTemplate(userPrincipalId, KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), new HashMap<String, String>(), roleQualification)) { results.add(dailyOvertimeRuleObj); } } } return results; } }
Department deptObj = HrServiceLocator.getDepartmentService().getDepartment(positionDepartment.getDepartment(),positionDepartment.getGroupKeyCode(),position.getEffectiveLocalDate()); orgQualifiers.add( Collections.singletonMap(KPMERoleMemberAttribute.ORGANIZATION.getRoleMemberAttributeName(), String.valueOf(deptObj.getOrg()))); Department deptObj = HrServiceLocator.getDepartmentService().getDepartment(positionDepartment.getDepartment(),positionDepartment.getGroupKeyCode(),((PositionBo)doc).getEffectiveLocalDate()); orgQualifiers.add( Collections.singletonMap(KPMERoleMemberAttribute.ORGANIZATION.getRoleMemberAttributeName(), String.valueOf(deptObj.getOrg())));
@Override public List<DeptLunchRule> getDepartmentLunchRules(String userPrincipalId, List<DeptLunchRule> departmentLunchRuleObjs) { List<DeptLunchRule> results = new ArrayList<DeptLunchRule>(); if (departmentLunchRuleObjs != null ){ for (DeptLunchRule departmentLunchRuleObj : departmentLunchRuleObjs) { String department = departmentLunchRuleObj.getDept(); String grpKeyCode = departmentLunchRuleObj.getGroupKeyCode(); Department departmentObj = HrServiceLocator.getDepartmentService().getDepartment(department, grpKeyCode, departmentLunchRuleObj.getEffectiveLocalDate()); String location = departmentObj != null ? departmentObj.getGroupKey().getLocationId() : null; Map<String, String> roleQualification = new HashMap<String, String>(); roleQualification.put(KimConstants.AttributeConstants.PRINCIPAL_ID, userPrincipalId); roleQualification.put(KPMERoleMemberAttribute.DEPARTMENT.getRoleMemberAttributeName(), department); roleQualification.put(KPMERoleMemberAttribute.GROUP_KEY_CODE.getRoleMemberAttributeName(), grpKeyCode); roleQualification.put(KPMERoleMemberAttribute.LOCATION.getRoleMemberAttributeName(), location); if (!KimApiServiceLocator.getPermissionService().isPermissionDefinedByTemplate(KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), new HashMap<String, String>()) || KimApiServiceLocator.getPermissionService().isAuthorizedByTemplate(userPrincipalId, KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), new HashMap<String, String>(), roleQualification)) { results.add(departmentLunchRuleObj); } } } return results; } }
public List<TimeCollectionRule> getTimeCollectionRules(String userPrincipalId, List <TimeCollectionRule> timeCollectionRuleObjs){ List<TimeCollectionRule> results = new ArrayList<TimeCollectionRule>(); if ( timeCollectionRuleObjs != null ){ for (TimeCollectionRule timeCollectionRuleObj : timeCollectionRuleObjs) { String department = timeCollectionRuleObj.getDept(); String grpKeyCode = timeCollectionRuleObj.getGroupKeyCode(); Department departmentObj = HrServiceLocator.getDepartmentService().getDepartment(department, grpKeyCode, timeCollectionRuleObj.getEffectiveLocalDate()); String location = departmentObj != null ? departmentObj.getGroupKey().getLocationId() : null; Map<String, String> permissionDetails = new HashMap<String, String>(); permissionDetails.put(KimConstants.AttributeConstants.DOCUMENT_TYPE_NAME, KRADServiceLocatorWeb.getDocumentDictionaryService().getMaintenanceDocumentTypeName(TimeCollectionRule.class)); Map<String, String> roleQualification = new HashMap<String, String>(); roleQualification.put(KimConstants.AttributeConstants.PRINCIPAL_ID, userPrincipalId); roleQualification.put(KPMERoleMemberAttribute.DEPARTMENT.getRoleMemberAttributeName(), department); roleQualification.put(KPMERoleMemberAttribute.GROUP_KEY_CODE.getRoleMemberAttributeName(), grpKeyCode); roleQualification.put(KPMERoleMemberAttribute.LOCATION.getRoleMemberAttributeName(), location); if (!KimApiServiceLocator.getPermissionService().isPermissionDefinedByTemplate(KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), permissionDetails) || KimApiServiceLocator.getPermissionService().isAuthorizedByTemplate(userPrincipalId, KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), permissionDetails, roleQualification)) { results.add(timeCollectionRuleObj); } } } return results; } }
protected void addRoleQualification(Object dataObject, Map<String, String> attributes) { super.addRoleQualification(dataObject, attributes); String department = StringUtils.EMPTY; String location = StringUtils.EMPTY; String groupKeyCode = StringUtils.EMPTY; if (dataObject instanceof TimeCollectionRule) { TimeCollectionRule timeCollectionRuleObj = (TimeCollectionRule) dataObject; if (timeCollectionRuleObj != null) { department = timeCollectionRuleObj.getDept(); groupKeyCode = timeCollectionRuleObj.getGroupKeyCode(); Department departmentObj = HrServiceLocator.getDepartmentService().getDepartment(department, groupKeyCode, timeCollectionRuleObj.getEffectiveLocalDate()); if (departmentObj != null) { location = departmentObj.getGroupKey().getLocationId(); } } } attributes.put(KPMERoleMemberAttribute.DEPARTMENT.getRoleMemberAttributeName(), department); attributes.put(KPMERoleMemberAttribute.GROUP_KEY_CODE.getRoleMemberAttributeName(), groupKeyCode); attributes.put(KPMERoleMemberAttribute.LOCATION.getRoleMemberAttributeName(), location); }
protected void addRoleQualification(Object dataObject, Map<String, String> attributes) { super.addRoleQualification(dataObject, attributes); String department = StringUtils.EMPTY; String location = StringUtils.EMPTY; String groupKeyCode = StringUtils.EMPTY; if (dataObject instanceof ClockLocationRule) { ClockLocationRule clockLocationRuleObj = (ClockLocationRule) dataObject; if (clockLocationRuleObj != null) { department = clockLocationRuleObj.getDept(); groupKeyCode = clockLocationRuleObj.getGroupKeyCode(); Department departmentObj = HrServiceLocator.getDepartmentService().getDepartment(department, groupKeyCode, clockLocationRuleObj.getEffectiveLocalDate()); if (departmentObj != null) { location = departmentObj.getGroupKey().getLocationId(); } } } attributes.put(KPMERoleMemberAttribute.DEPARTMENT.getRoleMemberAttributeName(), department); attributes.put(KPMERoleMemberAttribute.GROUP_KEY_CODE.getRoleMemberAttributeName(), department); attributes.put(KPMERoleMemberAttribute.LOCATION.getRoleMemberAttributeName(), location); }
protected void addRoleQualification(Object dataObject, Map<String, String> attributes) { super.addRoleQualification(dataObject, attributes); String department = StringUtils.EMPTY; String location = StringUtils.EMPTY; String groupKeyCode = StringUtils.EMPTY; if (dataObject instanceof DeptLunchRule) { DeptLunchRule departmentLunchRuleObj = (DeptLunchRule) dataObject; if (departmentLunchRuleObj != null) { department = departmentLunchRuleObj.getDept(); groupKeyCode = departmentLunchRuleObj.getGroupKeyCode(); Department departmentObj = HrServiceLocator.getDepartmentService().getDepartment(department, groupKeyCode, departmentLunchRuleObj.getEffectiveLocalDate()); if (departmentObj != null) { location = departmentObj.getGroupKey().getLocationId(); } } } attributes.put(KPMERoleMemberAttribute.DEPARTMENT.getRoleMemberAttributeName(), department); attributes.put(KPMERoleMemberAttribute.GROUP_KEY_CODE.getRoleMemberAttributeName(), groupKeyCode); attributes.put(KPMERoleMemberAttribute.LOCATION.getRoleMemberAttributeName(), location); }
private List<MissedPunchBo> filterByPrincipalId(List<MissedPunchBo> missedPunches, String principalId) { List<MissedPunchBo> results = new ArrayList<MissedPunchBo>(); //TODO - performance too many db calls in loop for (MissedPunchBo missedPunch : missedPunches) { JobContract jobObj = HrServiceLocator.getJobService().getJob(missedPunch.getPrincipalId(), missedPunch.getJobNumber(), LocalDate.fromDateFields(missedPunch.getActionDate())); String department = jobObj != null ? jobObj.getDept() : null; String groupKeyCode = jobObj != null ? jobObj.getGroupKeyCode() : null; Department departmentObj = jobObj != null ? HrServiceLocator.getDepartmentService().getDepartment(department, groupKeyCode, LocalDate.fromDateFields(missedPunch.getActionDate())) : null; String location = departmentObj != null ? departmentObj.getGroupKey().getLocationId() : null; Map<String, String> roleQualification = new HashMap<String, String>(); roleQualification.put(KimConstants.AttributeConstants.PRINCIPAL_ID, GlobalVariables.getUserSession().getPrincipalId()); roleQualification.put(KPMERoleMemberAttribute.DEPARTMENT.getRoleMemberAttributeName(), department); roleQualification.put(KPMERoleMemberAttribute.GROUP_KEY_CODE.getRoleMemberAttributeName(), groupKeyCode); roleQualification.put(KPMERoleMemberAttribute.LOCATION.getRoleMemberAttributeName(), location); if (!KimApiServiceLocator.getPermissionService().isPermissionDefinedByTemplate(KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), new HashMap<String, String>()) || KimApiServiceLocator.getPermissionService().isAuthorizedByTemplate(principalId, KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), new HashMap<String, String>(), roleQualification)) { results.add(missedPunch); } } return results; }
private List<TimeBlockBo> filterByPrincipalId(List<TimeBlockBo> timeBlocks, String principalId) { List<TimeBlockBo> results = new ArrayList<TimeBlockBo>(); //TODO - performance too many db calls in loop for (TimeBlockBo timeBlock : timeBlocks) { JobContract jobObj = HrServiceLocator.getJobService().getJob(timeBlock.getPrincipalId(), timeBlock.getJobNumber(), LocalDate.fromDateFields(timeBlock.getBeginDate()), false); String department = jobObj != null ? jobObj.getDept() : null; String groupKeyCode = jobObj != null ? jobObj.getGroupKeyCode() : null; Department departmentObj = jobObj != null ? HrServiceLocator.getDepartmentService().getDepartment(department, groupKeyCode, LocalDate.fromDateFields(timeBlock.getBeginDate())) : null; String location = departmentObj != null ? departmentObj.getGroupKey().getLocationId() : null; Map<String, String> roleQualification = new HashMap<String, String>(); roleQualification.put(KimConstants.AttributeConstants.PRINCIPAL_ID, GlobalVariables.getUserSession().getPrincipalId()); roleQualification.put(KPMERoleMemberAttribute.DEPARTMENT.getRoleMemberAttributeName(), department); roleQualification.put(KPMERoleMemberAttribute.GROUP_KEY_CODE.getRoleMemberAttributeName(), groupKeyCode); roleQualification.put(KPMERoleMemberAttribute.LOCATION.getRoleMemberAttributeName(), location); if (!KimApiServiceLocator.getPermissionService().isPermissionDefinedByTemplate(KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), new HashMap<String, String>()) || KimApiServiceLocator.getPermissionService().isAuthorizedByTemplate(principalId, KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), new HashMap<String, String>(), roleQualification)) { results.add(timeBlock); } } return results; }
private List<TimeBlockHistory> filterByPrincipalId(List<TimeBlockHistory> timeBlockHistories, String principalId) { List<TimeBlockHistory> results = new ArrayList<TimeBlockHistory>(); //TODO - performance too many db calls in loop for (TimeBlockHistory timeBlockHistory : timeBlockHistories) { JobContract jobObj = HrServiceLocator.getJobService().getJob(timeBlockHistory.getPrincipalId(), timeBlockHistory.getJobNumber(), LocalDate.fromDateFields(timeBlockHistory.getBeginDate()), false); String department = jobObj != null ? jobObj.getDept() : null; String groupKeyCode = jobObj != null ? jobObj.getGroupKeyCode() : null; Department departmentObj = jobObj != null ? HrServiceLocator.getDepartmentService().getDepartment(department, groupKeyCode, LocalDate.fromDateFields(timeBlockHistory.getBeginDate())) : null; String location = departmentObj != null ? departmentObj.getGroupKey().getLocationId() : null; Map<String, String> roleQualification = new HashMap<String, String>(); roleQualification.put(KimConstants.AttributeConstants.PRINCIPAL_ID, GlobalVariables.getUserSession().getPrincipalId()); roleQualification.put(KPMERoleMemberAttribute.DEPARTMENT.getRoleMemberAttributeName(), department); roleQualification.put(KPMERoleMemberAttribute.GROUP_KEY_CODE.getRoleMemberAttributeName(), groupKeyCode); roleQualification.put(KPMERoleMemberAttribute.LOCATION.getRoleMemberAttributeName(), location); if (!KimApiServiceLocator.getPermissionService().isPermissionDefinedByTemplate(KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), new HashMap<String, String>()) || KimApiServiceLocator.getPermissionService().isAuthorizedByTemplate(principalId, KPMENamespace.KPME_WKFLW.getNamespaceCode(), KPMEPermissionTemplate.VIEW_KPME_RECORD.getPermissionTemplateName(), new HashMap<String, String>(), roleQualification)) { results.add(timeBlockHistory); } } return results; }
String groupKeyCode = job != null ? job.getGroupKeyCode() : null; Department departmentObj = HrServiceLocator.getDepartmentService().getDepartment(department, groupKeyCode, LocalDate.fromDateFields(lb.getLeaveDate())); String location = departmentObj != null ? departmentObj.getGroupKey().getLocationId() : null;
String groupKeyCode = job.getGroupKeyCode(); Department departmentObj = HrServiceLocator.getDepartmentService().getDepartment(department, groupKeyCode, effectiveLocalDate); String location = departmentObj != null ? departmentObj.getGroupKey().getLocationId() : null; if (LmServiceLocator.getLMPermissionService().isAuthorizedInDepartment(userPrincipalId, "View Leave Payout", department, groupKeyCode, effectiveDate) || LmServiceLocator.getLMPermissionService().isAuthorizedInLocation(userPrincipalId, "View Leave Payout", location, effectiveDate)) {