⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adminservice.java

📁 一个关于tlms的一个小程序 看看能否帮助到别人
💻 JAVA
字号:
/**
 * ================================================================
 * Copyright 2006 szmx
 * <p/>
 * Change Revision
 * ---------------------------------------------------------------
 * Date               Author            Remarks
 * Mar 20, 2006       BZhang      Create class com.szmx.tlms.admin.service.AdminService
 * ================================================================
 */

package com.szmx.tlms.admin.service;

import com.szmx.tlms.admin.model.Employee;
import com.szmx.tlms.admin.model.Role;
import com.szmx.tlms.admin.model.Resource;
import com.szmx.tlms.TlmsServiceException;
import com.szmx.framework.base.model.Pagination;
import com.szmx.framework.base.service.BaseService;

import java.util.List;
import java.util.Map;


public interface AdminService extends BaseService {

    // Employee Managerment: ----------------------------------------

    /**
     * This method is for admin to search employee based on
     * search criteria with pagination and sort.
     *
     * @param pagination (the pagination object)
     * @param employee   (Map)  [should contains properties]
     *                   empId : String
     *                   status : String
     *                   name : String
     * @return Employee list for search result
     * @throws TlmsServiceException
     */
    public Pagination searchEmployees(final Pagination pagination,
                                      final Employee employee) throws TlmsServiceException;

    /**
     * This method is for admin to get the employee based on special Long id.
     *
     * @param id (the physic id of the employee : Long)
     * @return Employee object for search result
     * @throws TlmsServiceException
     */
    public Employee getEmployee(Long id) throws TlmsServiceException;

    /**
     * This method is for admin to get the employee based on special String employee id.
     *
     * @param empId (the company employee id of the employee : String)
     * @return Employee object for search result
     * @throws TlmsServiceException
     */
    public Employee getEmployee(String empId) throws TlmsServiceException;

    /**
     * This method is for admin to save the employee based on special employee object.
     *
     * @param employee (contains context to save, need not id, created & updated info)
     * @throws TlmsServiceException
     */
    public void saveEmployee(Employee employee) throws TlmsServiceException;

    /**
     * This method is for admin to update the employee based on special employee object.
     *
     * @param employee (contains context to save, need not updated info)
     * @throws TlmsServiceException
     */
    public void updateEmployee(Employee employee) throws TlmsServiceException;

    /**
     * This method is for admin to remove the employees based on checked employee.
     *
     * @param ids    (the array of selected Employee physic id, string value.)
     * @param userId (logined user physic id, Long value)
     * @throws TlmsServiceException
     */
    public void removeEmployees(String[] ids, Long userId) throws TlmsServiceException;

    /**
     * This method is for admin to active the employees based on checked employee.
     * Active a Locked user to Wating status.
     *
     * @param id     (the selected Employee physic id, Long value.)
     * @param userId (logined user physic id, Long value)
     * @throws TlmsServiceException
     */
    public void activeEmployee(Long id, Long userId) throws TlmsServiceException;

    /**
     * This method is for admin to reset the employee's password based on checked employee.
     *
     * @param id     (the selected Employee physic id, Long value.)
     * @param userId (logined user physic id, Long value)
     * @throws TlmsServiceException
     */
    public void resetPasswordByAdmin(Long id, Long userId) throws TlmsServiceException;

    /**
     * This method is for userself to change his/her password based on changed password info.
     *
     * @param map (Map) (Key,           Type)
     *            userId           Long
     *            oldPassword      String
     *            newPassword1     String
     *            newPassword2     String
     * @throws TlmsServiceException
     */
    public void resetPasswordBySelf(Map map) throws TlmsServiceException;

    // Role Managerment: ----------------------------------------

    /**
     * This method is for admin to search role based on
     * search criteria with pagination and sort.
     *
     * @param pagination (the pagination object)
     * @param paraMap    (Map)[should contains properties]
     *                   roleName : String
     * @return Role list for search result
     * @throws TlmsServiceException
     */
    public Pagination getRoles(Map paraMap, Pagination pagination) throws TlmsServiceException;

    /**
     * This method is for admin to search unassigned roles(roles which has no employee)
     *
     * @param roleId (the role id, Long)
     * @return Role list for search result
     * @throws TlmsServiceException
     */
    public List searchNotAssignedRoles(Long roleId) throws TlmsServiceException;

    /**
     * This method is for admin to search assigned roles(roles which has employee)
     *
     * @param roleId (the role id, Long)
     * @return Role list for search result
     * @throws TlmsServiceException
     */
    public List searchAssignedRoles(Long roleId) throws TlmsServiceException;

    /**
     * This method is for admin to search role with roleId
     *
     * @param roleId (the role id, Long)
     * @return Role for search result
     * @throws TlmsServiceException
     */
    public Role getRole(Long roleId) throws TlmsServiceException;

    /**
     * This method is for admin to remove roles with specific role id array
     *
     * @param idArr (the role id array, String[])
     * @throws TlmsServiceException
     */
    public void removeRole(String[] idArr) throws TlmsServiceException;

    // Resource for role ------------------------------------------

    /**
     * This method is for admin to update role (include basic infomation and resource assignment)
     *
     * @param role_res_map (Map) [should contains properties]
     *                     roleBean     Role
     *                     roleRes      List
     * @throws TlmsServiceException
     */
    public void updateRoleWithResource(Map role_res_map) throws TlmsServiceException;

    /**
     * This method is for admin to add role (include basic infomation and resource assignment)
     *
     * @param role_res_map (Map) [should contains properties]
     *                     roleBean     Role
     *                     roleRes      List
     * @throws TlmsServiceException
     */
    public void addRoleWithResource(Map role_res_map) throws TlmsServiceException;

    /**
     * This method is for admin to get resource which has assigned to the specific role id
     *
     * @param roleId (role id, Long)
     * @throws TlmsServiceException
     */
    public List getRoleResource(Long roleId) throws TlmsServiceException;

    /**
     * This method is for admin to get resource belonged to the specific module
     *
     * @param modId (module id, Long value)
     * @throws TlmsServiceException
     */
    public Resource getResourceModByModId(Long modId) throws TlmsServiceException;

    // Department Managerment: ----------------------------------------

    /**
     * This method is for admin to get all departments
     *
     * @param pagination (the pagination object)
     * @param paraMap    (Map) [empty map to get all department]
     * @throws TlmsServiceException
     */
    public Pagination searchDepartment(Pagination pagination, Map paraMap) throws TlmsServiceException;

    /**
     * This method is for admin to get all departments
     *
     * @throws TlmsServiceException
     */
    public List getDepartmentList() throws TlmsServiceException;

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -