private MetadataRestInfo addQueueGroups( List<OpenAcdQueueGroupRestInfoFull> queueGroupsRestInfo, List<OpenAcdQueueGroup> queueGroups) { List<OpenAcdSkillRestInfo> skillsRestInfo; List<OpenAcdAgentGroupRestInfo> agentGroupRestInfo; List<OpenAcdRecipeStepRestInfo> recipeStepRestInfo; // determine pagination PaginationInfo paginationInfo = RestUtilities.calculatePagination(m_form, queueGroups.size()); // create list of group restinfos for (int index = paginationInfo.startIndex; index <= paginationInfo.endIndex; index++) { OpenAcdQueueGroup queueGroup = queueGroups.get(index); skillsRestInfo = createSkillsRestInfo(queueGroup.getSkills()); agentGroupRestInfo = createAgentGroupsRestInfo(queueGroup); recipeStepRestInfo = createRecipeStepsRestInfo(queueGroup); OpenAcdQueueGroupRestInfoFull queueGroupRestInfo = new OpenAcdQueueGroupRestInfoFull( queueGroup, skillsRestInfo, agentGroupRestInfo, recipeStepRestInfo); queueGroupsRestInfo.add(queueGroupRestInfo); } // create metadata about agent groups MetadataRestInfo metadata = new MetadataRestInfo(paginationInfo); return metadata; }
private MetadataRestInfo addBranches( List<BranchRestInfoFull> branchesRestInfo, List<Branch> branches) { BranchRestInfoFull branchRestInfo; // determine pagination PaginationInfo paginationInfo = RestUtilities.calculatePagination(m_form, branches.size()); // create list of skill restinfos for (int index = paginationInfo.startIndex; index <= paginationInfo.endIndex; index++) { Branch branch = branches.get(index); branchRestInfo = new BranchRestInfoFull(branch); branchesRestInfo.add(branchRestInfo); } // create metadata about agent groups MetadataRestInfo metadata = new MetadataRestInfo(paginationInfo); return metadata; }