|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface AdminSecurityMgrIf
AdminSecurityMgrIf
Method Summary | |
---|---|
void |
addApiCallsToRole(AdminApiCall[] apiCalls,
int roleId)
Adds the array of AdminApiCall objects to the role identified by the roleId parameter. |
void |
addCustomDataToSession(java.lang.String sessionId,
java.lang.String data,
int position)
A sessionId is created when a customer logs in to KonaKart using the login() API call. |
void |
addPanelsToRole(AdminPanel[] panels,
int roleId)
Adds the array of AdminPanel objects to the role identified by the roleId parameter. |
void |
addRolesToUser(AdminRole[] roles,
int userId)
Adds the array of AdminRole objects to the user identified by the userId parameter. |
void |
changePassword(int custId,
java.lang.String currentPassword,
java.lang.String newPassword)
The method ensures that the current password is correct, and then changes it with the new password. |
int |
checkSession(java.lang.String sessionId,
java.lang.String apiCall)
The given sessionId is checked to see whether it exists and whether it is has timed out. |
void |
deleteApiCall(int apiCallId)
Deletes the apiCallId identified by the apiCallId parameter. |
int |
deleteExpiredSessions()
Deletes all sessions that have expired. |
void |
deletePanel(int panelId)
Deletes the panel identified by the panelId parameter. |
void |
deleteRole(int roleId)
Deletes the role identified by the roleId parameter. |
void |
editApiCall(AdminApiCall apiCall)
Edit an ApiCall. |
void |
editPanel(AdminPanel panel)
Edit a Panel. |
void |
editRole(AdminRole role)
Edit a Role. |
java.lang.String |
encrypt(java.lang.String password)
Generates a random byte which it concatenates with the password placing it in front (i.e. |
AdminApiCall[] |
getAllApiCalls()
Retrieves all apiCalls in an array |
AdminPanel[] |
getAllPanels()
Retrieves all panels in an array |
AdminRole[] |
getAllRoles()
Returns all roles |
AdminApiCall |
getApiCall(int apiCallId)
Returns the AdminApiCall referenced by the apiCallId. |
AdminApiCall[] |
getApiCallsPerRole(int roleId)
Retrieves an array of AdminApiCall objects for the role. |
java.lang.String |
getCustomDataFromSession(java.lang.String sessionId,
int position)
A sessionId is created when a customer logs in to KonaKart using the login() API call. |
AdminPanel |
getPanel(int panelId)
Returns the AdminPanel referenced by the panelId. |
AdminPanel[] |
getPanelsPerRole(int roleId)
Retrieves an array of AdminPanel objects for the role. |
AdminRole |
getRole(int roleId)
Returns the AdminRole referenced by the roleId. |
AdminRole[] |
getRolesPerUser(int userId)
Retrieves an array of AdminRole objects for the user. |
AdminSession |
getSession(java.lang.String sessionId)
Retrieves the session object for the specified sessionId |
int |
getTimeInSecs()
Utility method to return the current time in minutes |
int |
insertApiCall(AdminApiCall apiCall)
Insert a new apiCall. |
int |
insertPanel(AdminPanel panel)
Insert a new Panel. |
int |
insertRole(AdminRole role)
Insert a new Role. |
boolean |
isSuperUser(int userId)
Returns true if the user has a superUser role otherwise false |
java.lang.String |
login(java.lang.String user,
java.lang.String password)
Returns a session id if successful. |
void |
logout(java.lang.String sessionId)
Used to logout the user with the specified sessionId |
void |
refreshConfigs()
Refresh the configuration of the Admin Currency Manager |
void |
removeApiCallsFromRole(AdminApiCall[] apiCalls,
int roleId)
Removes the array of AdminApiCall objects from the role identified by the roleId parameter. |
void |
removePanelsFromRole(AdminPanel[] panels,
int roleId)
Removes the array of AdminPanel objects from the role identified by the roleId parameter. |
void |
removeRolesFromUser(AdminRole[] roles,
int userId)
Removes the array of AdminRole objects from the user identified by the userId parameter. |
Method Detail |
---|
java.lang.String login(java.lang.String user, java.lang.String password) throws java.lang.Exception
user
- password
-
java.lang.Exception
void logout(java.lang.String sessionId) throws java.lang.Exception
sessionId
- The session Id of the logged in user
java.lang.Exception
AdminSession getSession(java.lang.String sessionId) throws java.lang.Exception
sessionId
- the session to read
java.lang.Exception
int checkSession(java.lang.String sessionId, java.lang.String apiCall) throws java.lang.Exception
sessionId
- apiCall
-
java.lang.Exception
void changePassword(int custId, java.lang.String currentPassword, java.lang.String newPassword) throws java.lang.Exception
custId
- the customer Id of the customer whose password to changecurrentPassword
- current passwordnewPassword
- new password
java.lang.Exception
int deleteExpiredSessions() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
int getTimeInSecs()
java.lang.String encrypt(java.lang.String password) throws java.security.NoSuchAlgorithmException
password
-
java.security.NoSuchAlgorithmException
AdminRole[] getRolesPerUser(int userId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
userId
- the userId of the user whose roles & panels are returned. If the userId is 0, all
roles and all panels are returned.
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
boolean isSuperUser(int userId) throws KKAdminException
userId
- the userId (customerId) of the user to check
KKAdminException
AdminRole[] getAllRoles() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
AdminPanel[] getPanelsPerRole(int roleId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
roleId
-
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
AdminApiCall[] getApiCallsPerRole(int roleId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
roleId
-
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
AdminPanel[] getAllPanels() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
AdminApiCall[] getAllApiCalls() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
int insertRole(AdminRole role) throws org.apache.torque.TorqueException, KKAdminException
role
-
org.apache.torque.TorqueException
KKAdminException
void editRole(AdminRole role) throws org.apache.torque.TorqueException, KKAdminException
role
-
org.apache.torque.TorqueException
KKAdminException
AdminRole getRole(int roleId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
roleId
-
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
void deleteRole(int roleId) throws org.apache.torque.TorqueException, KKAdminException
roleId
-
org.apache.torque.TorqueException
KKAdminException
void addRolesToUser(AdminRole[] roles, int userId) throws java.lang.Exception
roles
- userId
-
java.lang.Exception
void removeRolesFromUser(AdminRole[] roles, int userId) throws java.lang.Exception
roles
- userId
-
java.lang.Exception
int insertPanel(AdminPanel panel) throws org.apache.torque.TorqueException, KKAdminException
panel
-
org.apache.torque.TorqueException
KKAdminException
int insertApiCall(AdminApiCall apiCall) throws org.apache.torque.TorqueException, KKAdminException
apiCall
-
org.apache.torque.TorqueException
KKAdminException
void editPanel(AdminPanel panel) throws org.apache.torque.TorqueException, KKAdminException
panel
-
org.apache.torque.TorqueException
KKAdminException
void editApiCall(AdminApiCall apiCall) throws org.apache.torque.TorqueException, KKAdminException
apiCall
-
org.apache.torque.TorqueException
KKAdminException
void deletePanel(int panelId) throws org.apache.torque.TorqueException, KKAdminException
panelId
-
org.apache.torque.TorqueException
KKAdminException
void deleteApiCall(int apiCallId) throws org.apache.torque.TorqueException, KKAdminException
apiCallId
-
org.apache.torque.TorqueException
KKAdminException
AdminPanel getPanel(int panelId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
panelId
-
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
AdminApiCall getApiCall(int apiCallId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
apiCallId
-
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
KKAdminException
void addPanelsToRole(AdminPanel[] panels, int roleId) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
panels
- roleId
-
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
void addApiCallsToRole(AdminApiCall[] apiCalls, int roleId) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
apiCalls
- roleId
-
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
void removePanelsFromRole(AdminPanel[] panels, int roleId) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
panels
- roleId
-
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
void removeApiCallsFromRole(AdminApiCall[] apiCalls, int roleId) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
apiCalls
- roleId
-
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
void refreshConfigs() throws KKAdminException
KKAdminException
void addCustomDataToSession(java.lang.String sessionId, java.lang.String data, int position) throws org.apache.torque.TorqueException, KKAdminException
sessionId
- The sessionIddata
- The data to be savedposition
- This must be in the range of 1-5 to identify custom1 to custom5
org.apache.torque.TorqueException
KKAdminException
java.lang.String getCustomDataFromSession(java.lang.String sessionId, int position) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
sessionId
- The sessionIdposition
- This must be in the range of 1-5 to identify custom1 to custom5
KKAdminException
org.apache.torque.TorqueException
com.workingdogs.village.DataSetException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |