|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcst.common.persistenceLayer.AbstractProductionService
cst.adminTool.persistenceLayer.ProductionAdminService
public class ProductionAdminService
The implementation of AdminServiceAPI that
manages the data repository as a MySQL database. The class services business
operations expected by the Administration Tool. This class is responsible for
the following tasks:
Many methods follow the same sequence of steps:
ProductionAdminQueries.
Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
| Field Summary |
|---|
| Fields inherited from class cst.common.persistenceLayer.AbstractProductionService |
|---|
activityChangesTableName, configurationManager, databaseName, log, productionServiceConnectionManager, sessionProperties, subjectTableName, trialSubjectModelFactory, userQueries, userTableName |
| Constructor Summary | |
|---|---|
ProductionAdminService()
|
|
| Method Summary | |
|---|---|
void |
addUser(User adminUser,
User user)
public void changeActivityName(User adminUser, String oldActivityDataStorageName, String newActivityDataStorageName) throws CSTException { validateAdministrator(adminUser); } public void addActivityStep(User adminUser, String activityDataStorageName, String activityStepDataStorageName) throws CSTException { validateAdministrator(adminUser); } public void changeActivityStepName(User adminUser, String oldActivityDataStorageName, String newActivityDataStorageName, String activityStepDataStorageName) throws CSTException { validateAdministrator(adminUser); } |
void |
changeAdministratorPassword(User candidateAdminUser,
java.lang.String newPassword)
|
void |
clearChanges(User adminUser)
removes all records that describe changes made to activity data. |
void |
clearDatabase(User adminUser)
produces an empty database. |
void |
clearUsers(User adminUser)
removes all users from the list of registered users. |
void |
createDatabase(User admin)
creates a database according to settings specified in the configuration file the end users choose when they start the Administration Tool. |
boolean |
databaseExists(User adminUser)
determines whether the database described in the configuration file at startup exists or not. |
void |
deleteDatabase(User admin)
deletes the database described in the configuration file end users choose when they start the Administration Tool. |
void |
deleteUser(User adminUser,
User user)
deletes a user from the registry of known users. |
java.util.ArrayList<User> |
getRegisteredUsers(User adminUser)
returns a collection of registered users for the system. |
java.util.ArrayList<TrialSubjectModel> |
getSubjectAttributeData(User adminUser)
Provides all the subject attribute data that is needed to uniquely identify and filter subjects. |
void |
importTrialSubjectModels(User adminUser,
java.util.ArrayList<TrialSubjectModel> trialSubjectModels)
imports a collection of trial subject model records into the data repository. |
void |
initialise(SessionProperties sessionProperties)
|
void |
synchroniseRepository(User adminUser)
ensures that every activity and activity step defined in the configuration file specied at startup has a corresponding entry in the data repository. |
void |
updateUser(User adminUser,
User user)
update the details of an existing user |
boolean |
userExists(User adminUser,
java.lang.String userID)
determines whether a given userID exists in the collection of registered users |
boolean |
validateAdministrator(User adminUser)
determine whether a given user is the administrator or not |
| Methods inherited from class cst.common.persistenceLayer.AbstractProductionService |
|---|
checkRepositoryIsSynchronised, closeStatements, commitDatabaseChanges, getTrialSubjectModel, initialiseConnection, rollBack, updateTrialActivity, validateUser |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface cst.common.businessLayer.CSTServiceAPI |
|---|
checkRepositoryIsSynchronised, getTrialSubjectModel |
| Constructor Detail |
|---|
public ProductionAdminService()
| Method Detail |
|---|
public void createDatabase(User admin)
throws CSTException
AdminServiceAPI
createDatabase in interface AdminServiceAPICSTException
public void clearDatabase(User adminUser)
throws CSTException
AdminServiceAPI
clearDatabase in interface AdminServiceAPICSTException
public void deleteDatabase(User admin)
throws CSTException
AdminServiceAPI
deleteDatabase in interface AdminServiceAPICSTException
public java.util.ArrayList<User> getRegisteredUsers(User adminUser)
throws CSTException
AdminServiceAPI
getRegisteredUsers in interface AdminServiceAPICSTException
public boolean userExists(User adminUser,
java.lang.String userID)
throws CSTException
AdminServiceAPI
userExists in interface AdminServiceAPICSTException
public boolean validateAdministrator(User adminUser)
throws CSTException
AdminServiceAPI
validateAdministrator in interface AdminServiceAPICSTException
public void changeAdministratorPassword(User candidateAdminUser,
java.lang.String newPassword)
throws CSTException
CSTException
public void initialise(SessionProperties sessionProperties)
throws CSTException
initialise in interface CSTServiceAPIinitialise in class AbstractProductionServiceCSTException
public java.util.ArrayList<TrialSubjectModel> getSubjectAttributeData(User adminUser)
throws CSTException
AdminServiceAPI
getSubjectAttributeData in interface AdminServiceAPICSTException
public void importTrialSubjectModels(User adminUser,
java.util.ArrayList<TrialSubjectModel> trialSubjectModels)
throws CSTException
AdminServiceAPI
importTrialSubjectModels in interface AdminServiceAPICSTException
public void addUser(User adminUser,
User user)
throws CSTException
addUser in interface AdminServiceAPICSTException
public void updateUser(User adminUser,
User user)
throws CSTException
AdminServiceAPI
updateUser in interface AdminServiceAPICSTException
public void deleteUser(User adminUser,
User user)
throws CSTException
AdminServiceAPI
deleteUser in interface AdminServiceAPICSTException
public void clearUsers(User adminUser)
throws CSTException
AdminServiceAPI
clearUsers in interface AdminServiceAPICSTException
public boolean databaseExists(User adminUser)
throws CSTException
AdminServiceAPI
databaseExists in interface AdminServiceAPICSTException
public void clearChanges(User adminUser)
throws CSTException
AdminServiceAPI
clearChanges in interface AdminServiceAPICSTException
public void synchroniseRepository(User adminUser)
throws CSTException
AdminServiceAPI
synchroniseRepository in interface AdminServiceAPICSTException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||