/** * Create user with given password. * * @param user the user to create * @param password the password for created user * @return created user * @throws APIException */ @Authorized( { PrivilegeConstants.ADD_USERS }) @Logging(ignoredArgumentIndexes = { 1 }) public User createUser(User user, String password) throws APIException;
/** * Saves/updates/proposes a concept proposal * * @param conceptProposal The ConceptProposal to save * @throws APIException * @return the saved/updated ConceptProposal object */ @Authorized({ PrivilegeConstants.ADD_CONCEPT_PROPOSALS, PrivilegeConstants.EDIT_CONCEPT_PROPOSALS }) public ConceptProposal saveConceptProposal(ConceptProposal conceptProposal) throws APIException;
/** * Save the given <code>hl7Source</code> to the database * * @param hl7Source the source to save * @return the saved source */ @Authorized(PrivilegeConstants.PRIV_UPDATE_HL7_SOURCE) public HL7Source saveHL7Source(HL7Source hl7Source) throws APIException;
/** * Create the given task * * @param task the task to be created * @should save task to the database */ @Authorized( { "Manage Scheduler" }) @Logging(ignore = true) public void saveTaskDefinition(TaskDefinition task);
/** * Get all of the hl7 source objects from the database. This includes retired ones * * @return list of hl7 source objects */ @Authorized(PrivilegeConstants.GET_HL7_SOURCE) public List<HL7Source> getAllHL7Sources() throws APIException;
/** * Changes the passed user's secret question and answer. * * @param u User to change * @param question * @param answer * @throws APIException * @since 1.5 * @should change the secret question and answer for given user */ @Authorized( { PrivilegeConstants.EDIT_USER_PASSWORDS }) @Logging(ignoredArgumentIndexes = { 1, 2 }) public void changeQuestionAnswer(User u, String question, String answer) throws APIException;
/** * Mark the given <code>hl7Source</code> as no longer active * * @param hl7Source the source to retire * @return the retired source */ @Authorized(PrivilegeConstants.PRIV_UPDATE_HL7_SOURCE) public HL7Source retireHL7Source(HL7Source hl7Source) throws APIException;
/** * the total count of all HL7InError objects in the database * * @param query search string * @return the count of matching HL7InError items * @throws APIException * @since 1.7 */ @Authorized(PrivilegeConstants.GET_HL7_IN_QUEUE) public Integer countHL7InError(String query) throws APIException;
/** * the total count of all HL7InArchive objects in the database * * @param messageState status of the HL7InArchive message * @param query search string * @return the count of matching HL7InArchive items * @throws APIException * @since 1.7 */ @Authorized(PrivilegeConstants.GET_HL7_IN_ARCHIVE) public Integer countHL7InArchive(int messageState, String query) throws APIException;
/** * Get the error item with the given id * * @param hl7InErrorId the id to search on * @return the matching error item */ @Authorized(PrivilegeConstants.GET_HL7_IN_EXCEPTION) public HL7InError getHL7InError(Integer hl7InErrorId) throws APIException;
/** * Method is called by the archives migration thread to transfer hl7 in archives from the * hl7_in_archives database table to the file system * * @param progressStatusMap the map holding the number of archives transferred and failed * transfers * @throws APIException */ @Authorized(requireAll = true, value = { PrivilegeConstants.GET_HL7_IN_ARCHIVE, PrivilegeConstants.PRIV_PURGE_HL7_IN_ARCHIVE, PrivilegeConstants.PRIV_ADD_HL7_IN_QUEUE }) public void migrateHl7InArchivesToFileSystem(Map<String, Integer> progressStatusMap) throws APIException;
/** * Marks the specified CohortMembership as voided * * @param cohortMembership the CohortMembership to void * @param reason void reason * @return the voided CohortMembership * @since 2.1.0 */ @Authorized({ PrivilegeConstants.EDIT_COHORTS }) CohortMembership voidCohortMembership(CohortMembership cohortMembership, String reason);
/** * Save the given list of global properties to the database. * * @param props list of GlobalProperty objects to save * @return the saved global properties * @should save all global properties to the database * @should not fail with empty list * @should assign uuid to all new properties * @should save properties with case difference only */ @Authorized(PrivilegeConstants.MANAGE_GLOBAL_PROPERTIES) public List<GlobalProperty> saveGlobalProperties(List<GlobalProperty> props);
/** * Completely remove the given global properties from the database * * @param globalProperties the global properties to delete/remove from the database * @throws APIException * @should delete global properties from database */ @Authorized(PrivilegeConstants.PURGE_GLOBAL_PROPERTIES) public void purgeGlobalProperties(List<GlobalProperty> globalProperties);
/** * Runs the <code>sql</code> on the database. If <code>selectOnly</code> is flagged then any * non-select sql statements will be rejected. * * @param sql * @param selectOnly * @return ResultSet * @throws APIException * @should execute sql containing group by */ @Authorized(PrivilegeConstants.SQL_LEVEL_ACCESS) public List<List<Object>> executeSQL(String sql, boolean selectOnly);
/** * Checks the status of a scheduled task. * * @param id * @return the <code>String</code> status of the task with the given identifier */ @Authorized( { "Manage Scheduler" }) public String getStatus(Integer id);
/** * Start all tasks that are scheduled to run on startup. */ @Override @Authorized( { "Manage Scheduler" }) public void onStartup();
/** * Loop over all currently started tasks and cycle them. This should be done after the * classloader has been changed (e.g. during module start/stop) */ @Authorized( { "Manage Scheduler" }) public void rescheduleAllTasks() throws SchedulerException;
/** * Get scheduled tasks. * * @return all scheduled tasks */ @Authorized( { "Manage Scheduler" }) public Collection<TaskDefinition> getScheduledTasks();
/** * Get the task with the given identifier. * * @param id the identifier of the task */ @Authorized( { "Manage Scheduler" }) public TaskDefinition getTask(Integer id);