public interface AdminSecurityMgrIf
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.String |
createSessionId()
create a sessionId string
|
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.
|
boolean |
sessionIdRequired(java.lang.String apiCall) |
java.lang.String login(java.lang.String user, java.lang.String password) throws java.lang.Exception
user
- the userpassword
- the passwordjava.lang.Exception
- an unexpected exceptionvoid logout(java.lang.String sessionId) throws java.lang.Exception
sessionId
- The session Id of the logged in userjava.lang.Exception
- an unexpected exceptionAdminSession getSession(java.lang.String sessionId) throws java.lang.Exception
sessionId
- the session to readjava.lang.Exception
- an unexpected exceptionint checkSession(java.lang.String sessionId, java.lang.String apiCall) throws java.lang.Exception
sessionId
- the sessionIdapiCall
- the apiCalljava.lang.Exception
- an unexpected exceptionvoid 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 passwordjava.lang.Exception
- an unexpected exceptionint deleteExpiredSessions() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineint getTimeInSecs()
java.lang.String encrypt(java.lang.String password) throws java.security.NoSuchAlgorithmException
password
- the passwordjava.security.NoSuchAlgorithmException
- an unexpected NoSuchAlgorithmException exceptionAdminRole[] getRolesPerUser(int userId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
userId
- the userId of the user whose roles and panels are returned. If the userId is 0,
all roles and all panels are returned.org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineboolean isSuperUser(int userId) throws KKAdminException
userId
- the userId (customerId) of the user to checkKKAdminException
- an unexpected exception in the KonaKart Admin engineAdminRole[] getAllRoles() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminPanel[] getPanelsPerRole(int roleId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
roleId
- the roleIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminApiCall[] getApiCallsPerRole(int roleId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
roleId
- the roleIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminPanel[] getAllPanels() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminApiCall[] getAllApiCalls() throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineint insertRole(AdminRole role) throws org.apache.torque.TorqueException, KKAdminException
role
- the roleorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid editRole(AdminRole role) throws org.apache.torque.TorqueException, KKAdminException
role
- the roleorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminRole getRole(int roleId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
roleId
- the roleIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid deleteRole(int roleId) throws org.apache.torque.TorqueException, KKAdminException
roleId
- the roleIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid addRolesToUser(AdminRole[] roles, int userId) throws java.lang.Exception
roles
- the rolesuserId
- the userIdjava.lang.Exception
- an unexpected exceptionvoid removeRolesFromUser(AdminRole[] roles, int userId) throws java.lang.Exception
roles
- the rolesuserId
- the userIdjava.lang.Exception
- an unexpected exceptionint insertPanel(AdminPanel panel) throws org.apache.torque.TorqueException, KKAdminException
panel
- the panelorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineint insertApiCall(AdminApiCall apiCall) throws org.apache.torque.TorqueException, KKAdminException
apiCall
- the apiCallorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid editPanel(AdminPanel panel) throws org.apache.torque.TorqueException, KKAdminException
panel
- the panelorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid editApiCall(AdminApiCall apiCall) throws org.apache.torque.TorqueException, KKAdminException
apiCall
- the apiCallorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid deletePanel(int panelId) throws org.apache.torque.TorqueException, KKAdminException
panelId
- the panelIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid deleteApiCall(int apiCallId) throws org.apache.torque.TorqueException, KKAdminException
apiCallId
- the apiCallIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminPanel getPanel(int panelId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
panelId
- the panelIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin engineAdminApiCall getApiCall(int apiCallId) throws org.apache.torque.TorqueException, com.workingdogs.village.DataSetException, KKAdminException
apiCallId
- the apiCallIdorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid addPanelsToRole(AdminPanel[] panels, int roleId) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
panels
- the panelsroleId
- the roleIdKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)void addApiCallsToRole(AdminApiCall[] apiCalls, int roleId) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
apiCalls
- the apiCallsroleId
- the roleIdKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)void removePanelsFromRole(AdminPanel[] panels, int roleId) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
panels
- the panelsroleId
- the roleIdKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)void removeApiCallsFromRole(AdminApiCall[] apiCalls, int roleId) throws KKAdminException, org.apache.torque.TorqueException, com.workingdogs.village.DataSetException
apiCalls
- the apiCallsroleId
- the roleIdKKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)void refreshConfigs() throws KKAdminException
KKAdminException
- an unexpected exception in the KonaKart Admin enginevoid 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 custom5org.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)KKAdminException
- an unexpected exception in the KonaKart Admin enginejava.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 custom5KKAdminException
- an unexpected exception in the KonaKart Admin engineorg.apache.torque.TorqueException
- an unexpected exception in Torque (the database layer)com.workingdogs.village.DataSetException
- an unexpected exception due to data in Torque (the database layer)java.lang.String createSessionId()
boolean sessionIdRequired(java.lang.String apiCall)
apiCall
- the API callCopyright © 2018 DS Data Systems UK Ltd.