pase.agenda
Class AdminAPIImpl

java.lang.Object
  extended by pase.agenda.AdminAPIImpl
All Implemented Interfaces:
AdminAPI

public class AdminAPIImpl
extends java.lang.Object
implements AdminAPI

No comment yet

Version:
1.1.5,
Author:
lchuang

Constructor Summary
AdminAPIImpl(FlowService flowService, SecurityService securityService, UtilityService utilityService)
           
 
Method Summary
 boolean activeBBSBoard(java.lang.String boardID)
           
 boolean bypassTask(Task p_TaskID, java.lang.String p_AstID)
          ByPass a task.
 boolean changePassword(java.lang.String uID, java.lang.String newPwd)
          other command
 boolean deleteBBSBoard(java.lang.String boardID)
           
 boolean deleteFunctionAccess(FunctionAccess access)
          Delete user's FunctionAccess.
 boolean deleteFunctionAccess(java.lang.String principalID, java.lang.String orgID, java.lang.String functionName, java.lang.String permission)
          Delete user's FunctionAccess.
 boolean forceReassignTask(java.lang.String p_TaskID, java.lang.String p_MemID)
          Force to reassign a task to other user.
 boolean forceReassignTask(java.lang.String p_TaskID, java.lang.String p_MemID, java.lang.String p_RoleID)
          Force to reassign the task and assign the specific roleID when this member has multi-roles.
 AccessManager getAccessManagerByOrgRightID(java.lang.String managerID, java.lang.String orgRightID)
          Get the content of AccessManager of user.
 java.util.Vector getAllBBSBoard()
           
 java.util.Vector getBBSBoard()
          bbs's command
 java.util.Vector getConcurrentUser()
          Get the concurrent user list.
 java.util.List getFunctionAccessList(java.lang.String principalID)
          Get the content of AccessManager of user.
 java.util.List getFunctionAccessList(java.lang.String principalID, java.lang.String orgID, java.lang.String functionName, java.lang.String permission)
          Get the content of AccessManager of user.
 java.util.Vector getHalfHolidays()
          Get the half-holidays list.
 java.util.Vector getHolidays()
          Get the holidays list.
 AccessMember getMemberAccess(java.lang.String memID)
          domination command
 AccessAdmin getMemberAdminAccess(java.lang.String memID)
          Get the content of AccessAdmin of user.
 java.util.Vector getMemberArtifactAccess(java.lang.String memID)
          Get the list of AccessArtifact of user.
 AccessOnLineUser getMemberOnLineAccess(java.lang.String memID)
          Get the content of AccessOnLineUser of user.
 java.util.Vector getMemberTaskAccess(java.lang.String memID)
          Get the list of AccessTask of user.
 java.util.Vector getOnLineAdminUser()
          Get the on-line admin user list.
 java.util.Vector getOnLineUser()
          on-line user command
 int[] getWeek()
          Get the weeks list.
 java.util.Vector getWorkdays()
          Get the workdays list.
 void initHoliday()
          schedule's command
 boolean kickOnLineAdminUser(java.lang.String memID)
          remove an admin user from on-line in sever.
 boolean kickOnLineUser(java.lang.String memID)
          remove an user from on-line in sever.
 boolean newBBSBoard(BBSBoard bbsBoard)
           
 boolean reflushProcessManager()
          Demmand process manager of server to re-schedule.
 boolean removeTaskByAdm(java.lang.String tID)
          process's command
 void saveSchedule(java.util.Vector hdays, java.util.Vector h_days, java.util.Vector wdays, int[] w)
          Save server's schedule.
 java.util.Vector searchData(pe.tse.SearchCondition cond)
          search's command
 int searchDataCount(pe.tse.SearchCondition cond)
          Get searched number by using given conditions.
 void sendShortMessageToAdminAll(java.lang.String msg, java.lang.String fromMemID)
          send short message to all on-line admin users
 void sendShortMessageToAll(java.lang.String msg, java.lang.String fromMemID)
          send short message to all on-line users
 void sendShortMessgeToAdminUser(java.lang.String msg, java.lang.String fromMemID, java.lang.String toMemID)
          send short message to someone admin user online
 void sendShortMessgeToUser(java.lang.String msg, java.lang.String fromMemID, java.lang.String toMemID)
          send short message to someone user online
 boolean setFunctionAccess(FunctionAccess access)
          Set user's FunctionAccess.
 boolean setMemberAccess(java.lang.String memID, AccessMember access)
          Set user's AccessMember.
 boolean setMemberAdminAccess(java.lang.String memID, AccessAdmin access)
          Set user's AccessAdmin.
 boolean setMemberArtifactAccess(java.lang.String memID, java.util.Vector artifactAccessList)
          Set user's AccessArtifact list.
 boolean setMemberOnLineAccess(java.lang.String memID, AccessOnLineUser access)
          Set user's AccessOnLineUser.
 boolean setMemberTaskAccess(java.lang.String memID, java.util.Vector taskAccessList)
          Set user's AccessTask list.
 boolean suspendBBSBoard(java.lang.String bbsBoardID)
           
 boolean updateBBSBoard(BBSBoard bbsBoard)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AdminAPIImpl

public AdminAPIImpl(FlowService flowService,
                    SecurityService securityService,
                    UtilityService utilityService)
Method Detail

searchData

public java.util.Vector searchData(pe.tse.SearchCondition cond)
search's command

Specified by:
searchData in interface AdminAPI
Parameters:
cond - the given SearchCondition
Returns:
a vector which entities depend on given condition type

searchDataCount

public int searchDataCount(pe.tse.SearchCondition cond)
Description copied from interface: AdminAPI
Get searched number by using given conditions. The condition choices are:

Specified by:
searchDataCount in interface AdminAPI
Parameters:
cond - the given SearchCondition
Returns:
the number have found

removeTaskByAdm

public boolean removeTaskByAdm(java.lang.String tID)
process's command

Specified by:
removeTaskByAdm in interface AdminAPI
Parameters:
tID - the task ID that the task will be removed
Returns:
true if removeTaskByAdm has been run properly

bypassTask

public boolean bypassTask(Task p_TaskID,
                          java.lang.String p_AstID)
Description copied from interface: AdminAPI
ByPass a task. A state should be chosen to determine how to bypass the task.

Specified by:
bypassTask in interface AdminAPI
p_AstID - the state ID which is used to determine which path to pass
Returns:
true if bypassTask has been run properly

forceReassignTask

public boolean forceReassignTask(java.lang.String p_TaskID,
                                 java.lang.String p_MemID,
                                 java.lang.String p_RoleID)
Description copied from interface: AdminAPI
Force to reassign the task and assign the specific roleID when this member has multi-roles.

Specified by:
forceReassignTask in interface AdminAPI
Parameters:
p_TaskID - the given TaskID
p_MemID - the given MemberRecordID
p_RoleID - the given RoleID
Returns:
true if it sets successfully; false otherwise

forceReassignTask

public boolean forceReassignTask(java.lang.String p_TaskID,
                                 java.lang.String p_MemID)
Description copied from interface: AdminAPI
Force to reassign a task to other user.

Specified by:
forceReassignTask in interface AdminAPI
Parameters:
p_TaskID - the task ID which it's executor will be changed
p_MemID - the Member ID which is assigned to accept the task
Returns:
true if forceReassignTask has been run properly

getMemberAccess

public AccessMember getMemberAccess(java.lang.String memID)
domination command

Specified by:
getMemberAccess in interface AdminAPI
Parameters:
memID - the Member ID
Returns:
AccessMember contains functions permission. return null if no found such AccessMember instance.

setMemberAccess

public boolean setMemberAccess(java.lang.String memID,
                               AccessMember access)
Description copied from interface: AdminAPI
Set user's AccessMember.

Specified by:
setMemberAccess in interface AdminAPI
Parameters:
memID - the Member ID
access - AccessMember
Returns:
true if setMemberAccess has been run properly

getMemberOnLineAccess

public AccessOnLineUser getMemberOnLineAccess(java.lang.String memID)
Description copied from interface: AdminAPI
Get the content of AccessOnLineUser of user.

Specified by:
getMemberOnLineAccess in interface AdminAPI
Parameters:
memID - the Member ID
Returns:
AccessOnLineUser specifies user's permission, return null if no found such AccessOnLineUser instance

setMemberOnLineAccess

public boolean setMemberOnLineAccess(java.lang.String memID,
                                     AccessOnLineUser access)
Description copied from interface: AdminAPI
Set user's AccessOnLineUser.

Specified by:
setMemberOnLineAccess in interface AdminAPI
Parameters:
memID - the Member ID
access - AccessOnLineUser
Returns:
true if setMemberOnLineAccess has been run properly

getMemberTaskAccess

public java.util.Vector getMemberTaskAccess(java.lang.String memID)
Description copied from interface: AdminAPI
Get the list of AccessTask of user. AccessTask's range consists of department, role and member. AccessTask's permission provides read and modify properties.

Specified by:
getMemberTaskAccess in interface AdminAPI
Parameters:
memID - the Member ID
Returns:
vector of AccessTask. return empty vector if no found any one.

setMemberTaskAccess

public boolean setMemberTaskAccess(java.lang.String memID,
                                   java.util.Vector taskAccessList)
Description copied from interface: AdminAPI
Set user's AccessTask list.

Specified by:
setMemberTaskAccess in interface AdminAPI
Parameters:
memID - the Member ID
Returns:
true if setMemberTaskAccess has been run properly

getMemberArtifactAccess

public java.util.Vector getMemberArtifactAccess(java.lang.String memID)
Description copied from interface: AdminAPI
Get the list of AccessArtifact of user. AccessArtifact's range consists of project and artifact. AccessArtifact's permission provides read property only.

Specified by:
getMemberArtifactAccess in interface AdminAPI
Parameters:
memID - the member ID
Returns:
vector of AccessArtifact. return empty vector if no found any one.

setMemberArtifactAccess

public boolean setMemberArtifactAccess(java.lang.String memID,
                                       java.util.Vector artifactAccessList)
Description copied from interface: AdminAPI
Set user's AccessArtifact list.

Specified by:
setMemberArtifactAccess in interface AdminAPI
Parameters:
memID - the Member ID
Returns:
true if setMemberArtifactAccess has been run properly

getMemberAdminAccess

public AccessAdmin getMemberAdminAccess(java.lang.String memID)
Description copied from interface: AdminAPI
Get the content of AccessAdmin of user. It can check what function the user can use in Admin.

Specified by:
getMemberAdminAccess in interface AdminAPI
Parameters:
memID - the Member ID
Returns:
AccessAdmin contains functions permission. return null if no found such AccessAdmin instance.

setMemberAdminAccess

public boolean setMemberAdminAccess(java.lang.String memID,
                                    AccessAdmin access)
Description copied from interface: AdminAPI
Set user's AccessAdmin.

Specified by:
setMemberAdminAccess in interface AdminAPI
Parameters:
memID - the Member ID
access - AccessAdmin
Returns:
true if setMemberAdminAccess has been run properly

getAccessManagerByOrgRightID

public AccessManager getAccessManagerByOrgRightID(java.lang.String managerID,
                                                  java.lang.String orgRightID)
Description copied from interface: AdminAPI
Get the content of AccessManager of user. It can check what function the user can use in Admin.

Specified by:
getAccessManagerByOrgRightID in interface AdminAPI
Returns:
AccessManager contains functions permission. return null if no found such AccessManager instance.

getFunctionAccessList

public java.util.List getFunctionAccessList(java.lang.String principalID)
Description copied from interface: AdminAPI
Get the content of AccessManager of user. It can check What kind of function can be used in Admin by the user.

Specified by:
getFunctionAccessList in interface AdminAPI
Returns:
List of FunctionAccess contains functions permission. such FunctionAccess instance.

getFunctionAccessList

public java.util.List getFunctionAccessList(java.lang.String principalID,
                                            java.lang.String orgID,
                                            java.lang.String functionName,
                                            java.lang.String permission)
Description copied from interface: AdminAPI
Get the content of AccessManager of user. It can check What kind of function can be used in Admin by the user.

Specified by:
getFunctionAccessList in interface AdminAPI
Returns:
List of FunctionAccess contains functions permission. such FunctionAccess instance.

setFunctionAccess

public boolean setFunctionAccess(FunctionAccess access)
Description copied from interface: AdminAPI
Set user's FunctionAccess.

Specified by:
setFunctionAccess in interface AdminAPI
Parameters:
access - FunctionAccess
Returns:
true if setFunctionAccess has been run properly

deleteFunctionAccess

public boolean deleteFunctionAccess(FunctionAccess access)
Description copied from interface: AdminAPI
Delete user's FunctionAccess.

Specified by:
deleteFunctionAccess in interface AdminAPI
Parameters:
access - FunctionAccess
Returns:
true if deleteFunctionAccess has been run properly

deleteFunctionAccess

public boolean deleteFunctionAccess(java.lang.String principalID,
                                    java.lang.String orgID,
                                    java.lang.String functionName,
                                    java.lang.String permission)
Description copied from interface: AdminAPI
Delete user's FunctionAccess.

Specified by:
deleteFunctionAccess in interface AdminAPI
Parameters:
principalID - String
orgID - String
functionName - String
permission - String
Returns:
true if deleteFunctionAccess has been run properly

initHoliday

public void initHoliday()
schedule's command

Specified by:
initHoliday in interface AdminAPI

getWeek

public int[] getWeek()
Description copied from interface: AdminAPI
Get the weeks list.

Specified by:
getWeek in interface AdminAPI
Returns:
an array of integer.

getHolidays

public java.util.Vector getHolidays()
Description copied from interface: AdminAPI
Get the holidays list.

Specified by:
getHolidays in interface AdminAPI
Returns:
a Vector of date.

getHalfHolidays

public java.util.Vector getHalfHolidays()
Description copied from interface: AdminAPI
Get the half-holidays list.

Specified by:
getHalfHolidays in interface AdminAPI
Returns:
a Vector of date.

getWorkdays

public java.util.Vector getWorkdays()
Description copied from interface: AdminAPI
Get the workdays list.

Specified by:
getWorkdays in interface AdminAPI
Returns:
a Vector of date.

saveSchedule

public void saveSchedule(java.util.Vector hdays,
                         java.util.Vector h_days,
                         java.util.Vector wdays,
                         int[] w)
Description copied from interface: AdminAPI
Save server's schedule.

Specified by:
saveSchedule in interface AdminAPI
Parameters:
hdays - the Vector of holidays date
h_days - the Vector of half-holidays date
wdays - the Vector of workdays date
w - the array of weeks integer

getBBSBoard

public java.util.Vector getBBSBoard()
bbs's command

Specified by:
getBBSBoard in interface AdminAPI
See Also:
clientAPI

getAllBBSBoard

public java.util.Vector getAllBBSBoard()
Specified by:
getAllBBSBoard in interface AdminAPI
See Also:
clientAPI

newBBSBoard

public boolean newBBSBoard(BBSBoard bbsBoard)
Specified by:
newBBSBoard in interface AdminAPI
See Also:
clientAPI

suspendBBSBoard

public boolean suspendBBSBoard(java.lang.String bbsBoardID)
Specified by:
suspendBBSBoard in interface AdminAPI
See Also:
clientAPI

deleteBBSBoard

public boolean deleteBBSBoard(java.lang.String boardID)
Specified by:
deleteBBSBoard in interface AdminAPI
See Also:
clientAPI

updateBBSBoard

public boolean updateBBSBoard(BBSBoard bbsBoard)
Specified by:
updateBBSBoard in interface AdminAPI
See Also:
clientAPI

activeBBSBoard

public boolean activeBBSBoard(java.lang.String boardID)
Specified by:
activeBBSBoard in interface AdminAPI
See Also:
clientAPI

getOnLineUser

public java.util.Vector getOnLineUser()
on-line user command

Specified by:
getOnLineUser in interface AdminAPI
Returns:
a Vector of MemberRecord.

getConcurrentUser

public java.util.Vector getConcurrentUser()
Description copied from interface: AdminAPI
Get the concurrent user list.

Specified by:
getConcurrentUser in interface AdminAPI
Returns:
a Vector of MemberRecord.

kickOnLineUser

public boolean kickOnLineUser(java.lang.String memID)
Description copied from interface: AdminAPI
remove an user from on-line in sever.

Specified by:
kickOnLineUser in interface AdminAPI
Returns:
a Vector of MemberRecord.

sendShortMessgeToUser

public void sendShortMessgeToUser(java.lang.String msg,
                                  java.lang.String fromMemID,
                                  java.lang.String toMemID)
Description copied from interface: AdminAPI
send short message to someone user online

Specified by:
sendShortMessgeToUser in interface AdminAPI
Parameters:
msg - the message string
fromMemID - the member ID
toMemID - the received member ID

sendShortMessageToAll

public void sendShortMessageToAll(java.lang.String msg,
                                  java.lang.String fromMemID)
Description copied from interface: AdminAPI
send short message to all on-line users

Specified by:
sendShortMessageToAll in interface AdminAPI
Parameters:
msg - the message string
fromMemID - the member ID

getOnLineAdminUser

public java.util.Vector getOnLineAdminUser()
Description copied from interface: AdminAPI
Get the on-line admin user list.

Specified by:
getOnLineAdminUser in interface AdminAPI
Returns:
a Vector of MemberRecord.

kickOnLineAdminUser

public boolean kickOnLineAdminUser(java.lang.String memID)
Description copied from interface: AdminAPI
remove an admin user from on-line in sever.

Specified by:
kickOnLineAdminUser in interface AdminAPI
Returns:
a Vector of MemberRecord.

sendShortMessgeToAdminUser

public void sendShortMessgeToAdminUser(java.lang.String msg,
                                       java.lang.String fromMemID,
                                       java.lang.String toMemID)
Description copied from interface: AdminAPI
send short message to someone admin user online

Specified by:
sendShortMessgeToAdminUser in interface AdminAPI
Parameters:
msg - the message string
fromMemID - the member ID
toMemID - the received member ID

sendShortMessageToAdminAll

public void sendShortMessageToAdminAll(java.lang.String msg,
                                       java.lang.String fromMemID)
Description copied from interface: AdminAPI
send short message to all on-line admin users

Specified by:
sendShortMessageToAdminAll in interface AdminAPI
Parameters:
msg - the message string
fromMemID - the member ID

changePassword

public boolean changePassword(java.lang.String uID,
                              java.lang.String newPwd)
other command

Specified by:
changePassword in interface AdminAPI
Parameters:
uID - the member ID
newPwd - the new password
Returns:
true if password changed properly.

reflushProcessManager

public boolean reflushProcessManager()
Description copied from interface: AdminAPI
Demmand process manager of server to re-schedule.

Specified by:
reflushProcessManager in interface AdminAPI
Returns:
true if reflushProcessManager is run properly.