📄 profilemanagerproxy.java
字号:
*
* @param startIndex the beginning index to start the results at.
* @param numResults the total number of results to return.
* @return an Iterator for all groups in the specified range.
*/
public Iterator groups(int startIndex, int numResults) {
Iterator iterator = profileManager.groups(startIndex, numResults);
return new GroupIteratorProxy(iterator, authorization, permissions);
}
/**
* Return the root unit of whole organization hierachy
* @return an Unit object represents the root unit
*/
public Unit getRootUnit()
{
Unit unit = profileManager.getRootUnit();
return new UnitProxy( unit, authorization, permissions);
}
/**
* Gets a Unit by ID.
*
* throws UnitNotFoundException if the group does not exist.
* @see Unit
*/
public Unit getUnit( String unitID ) throws UnitNotFoundException
{
Unit unit = profileManager.getUnit(unitID);
return new UnitProxy( unit,authorization, permissions);
}
/**
* Factory method for creating a new Unit. A parent unit and a unique name
* under the parent unit are required fields.
*
* @param parent the Unit which the new Unit directly belongs to
* @param name the new and unique name among sibling units
* @return a new Unit.
* @throws UnitCreationFailureExceptionException if fails
*/
public Unit createUnit( Unit parent, String newUnitID,String unitName,String phone,String lxr,String inside) throws
UnauthorizedException, UnitCreationFailureException {
if (permissions.get(IofficePermissions.SYSTEM_ADMIN)) {
return new UnitProxy(
profileManager.createUnit(parent, newUnitID,unitName,phone,lxr,inside),
authorization,
permissions
);
}
else {
throw new UnauthorizedException();
}
}
/**
* Delete the unit. This operation will automatically delete all the subunits
* recursively.
*
* @param unit the Unit to be deleted
* @throws UnauthorizedException if it does not have the permission
*/
public void deleteUnit( Unit unit ) throws UnauthorizedException {
if (permissions.get(IofficePermissions.SYSTEM_ADMIN)) {
profileManager.deleteUnit(unit);
}
else {
throw new UnauthorizedException();
}
}
/**
* Find all the group not linked with any unit
*
* @return the IDs of the Groups
*/
public int[] getUnitFreeGroups() {
return profileManager.getUnitFreeGroups();
}
/**
*得到某一用户所在的组
* Get ids of all the groups who contains the specified user
*
* @param userid represents the specified user
* @return the array of group-ids
*
* (Sorry for the poor function name, someone's Java is much better
* than his English)
*/
public int[] getGroupsExistUserID(int userid) {
return profileManager.getGroupsExistUserID(userid);
}
/**
*得到我的下属用户(在同一单位或下级单位)
* Find all the users under the charge of the specified user
*
* @param userid represents the specified user
* @return the array of user-ids
*/
public int[] getUnderUsers(int userid) {
return profileManager.getUnderUsers(userid);
}
/**
*得到该用户所在的单位
* Get ids of all the units who contains the specified user
*
* @return the array of unit-ids
* @param userid represents the specified user
*/
public Unit[] getUnitsExistUserID(int userid) {
return profileManager.getUnitsExistUserID(userid);
}
/**
* 得到某一单位下的属于我管理的用户(在同一单位)
* Find all the users under the charge of the given user and
* belonging to the same unit of the given user.<p> This function
* is specially developed for the Project of China Telecom case.
*
* @param userid represents the given user
* @return the array of user-ids
*/
public User[] getUnderUsers_byunit(int userid,String unitid) {
return profileManager.getUnderUsers_byunit(userid,unitid);
}
/**
* 得到某一单位下的属于我管理的用户(在同一单位)
* Find all the users under the charge of the given user and
* belonging to any sub unit of the given unit. <p> This function
* is specially developed for the Project of China Telecom case.
*
* @param userid represents the given user
* @param unitid represents the given unit
* @return the array of user-ids
*/
public int[] getUnderUsers_bysubunit(int userid,String unitid) {
return profileManager.getUnderUsers_bysubunit(userid,unitid);
}
/**
* 得到我属于高级负责人的单位
* Find all the units in which the given user is manager
*
* @param userid represents the specified user
* @return the array of unit-ids
*/
public Unit[] getUnitsExistManager(int userid) {
return profileManager.getUnitsExistManager(userid);
}
/**
* Test if the given user has the given priority level in the given unit.
*
* @param userid the given user
* @param unitid the given unit
* @param PRI the given priority level, from 0(h) to 2 (l)
* @return true or false
*/
public boolean isPrincipalInUnit(int userid,String unitid,int PRI) {
return profileManager.isPrincipalInUnit(userid,unitid,PRI);
}
/**
* Get all the email addresses of the given users
*
* @param userIDs represents the given users
* @return the array of e-mail addresses correspondingly
*/
public String[] getEmails_byUserID(int[] userIDs) {
return profileManager.getEmails_byUserID(userIDs);
}
/**
* Get a list of all existing units
*
* @return the IDs of the existing units
*/
public String[] getAllUnits() {
return profileManager.getAllUnits();
}
public HashMap getOutSideUnits(){
return profileManager.getOutSideUnits();
}
public ArrayList getUnitsExistUserID_new(int userid) {
return profileManager.getUnitsExistUserID_new(userid);
}
public ArrayList getUnitsExistManager_new(int userid)
{
return profileManager.getUnitsExistManager_new(userid);
}
public ArrayList getGroupsExistUserID_new(int userid)
{
return profileManager.getGroupsExistUserID_new(userid);
}
public ArrayList getAllUsers_byUnit(String unitID) {
return profileManager.getAllUsers_byUnit(unitID);
}
public ArrayList getAllInsideUsers_byUnit(String unitID) {
return profileManager.getAllInsideUsers_byUnit(unitID);
}
public User[] getAllUserInUnitFormLevel(String unitid, int level){
return profileManager.getAllUserInUnitFormLevel(unitid,level);
}
public User[] getUserInUnitFormLevel(String unitid, int level){
return profileManager.getUserInUnitFormLevel(unitid,level);
}
public Properties getTopPriAndUnit(int userid) {
return profileManager.getTopPriAndUnit(userid);
}
public boolean isSupervisor(String unitid, int userid,int level){
return profileManager.isSupervisor(unitid,userid,level);
}
public boolean isSupervisor(String unitid, int userid){
return profileManager.isSupervisor(unitid,userid);
}
public String[] getUnDoByCLR(String clr,String gxdw,String cldw,String type){
return profileManager.getUnDoByCLR(clr,gxdw,cldw,type);
}
public String[] getUnDoByType(String gxdw,String cldw,String type){
return profileManager.getUnDoByType(gxdw,cldw,type);
}
public String[] getUnDoByType2(String gxdw,String cldw,String type){
return profileManager.getUnDoByType2(gxdw,cldw,type);
}
public String[] getUnDoDjs(String gxdw,String cldw){
return profileManager.getUnDoDjs(gxdw,cldw);
}
public String[] getUserDjByTypeAndStatus(String type,String userID){
return profileManager.getUserDjByTypeAndStatus(type,userID);
}
public String[] getDoingByTypeForSupervisor(String type,String gxdw,String supervisorID){
return profileManager.getDoingByTypeForSupervisor(type,gxdw,supervisorID);
}
public ArrayList getUnFinishedList(String djjg,String cldw){
return profileManager.getUnFinishedList(djjg,cldw);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -