Package com.denodo.scheduler.client
Interface SchedulerManager
- All Superinterfaces:
Serializable
Interface to be implemented by a scheduler manager client facade. It defines
the main use cases for a scheduler manager client: jobs management (start, stop, etc.)
and meta data (data sources and jobs) CRUD and search operations.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionaddDataSource(int projectID, Configuration config) Creates a new data source using the given configuration and associates it to the specified project.addJDBCDriver(Set<com.denodo.util.Pair<String, byte[]>> files, String dataBaseAdapter, String version, String className, String uriTemplate) Adds a new jdbc driver to the scheduler.addJob(int projectID, Configuration config) Creates a new job using the given configuration and associates it to the specified project.Adds a new plugin (custom element implementation) to the scheduler.addProject(String name, String description) Creates a new project using the default structure from the template configuration fileproject-template.xml.voidassignPrivileges(RoleInfo role) Assigns the privileges to a role, overriding its previous ones if the role existed, or creating it otherwise.changeClusterSettings(ClusterConfig cluster) Modifies the cluster settings used by the server.byte[]changeDatabaseConfig(DatabaseConfig settings, boolean exportCurrentMetadata, boolean checkConnectivity) Modifies the database settings and exports the current metadata if the user specifies it.changeKerberosSettings(KerberosSettings kerberosSettings) Modifies the kerberos settings used by the server.voidchangePassword(String oldClearPassword, String newClearPassword) Method that allows clients to modify their passwords they use to log on to the server.changeServerPorts(ServerPorts ports) Modifies the port numbers used by the server.changeServerSettings(ServerSettings settings) Modifies the server settings.Modifies the VDP data source settings.voidCompresses the job reports table in database.byte[]exportData(ExportOptions exportOptions) byte[]exportData(Collection<Integer> projectsToExport, ExportOptions exportOptions) byte[]exportData(Map<Integer, Set<Integer>> elementsToExport, ExportOptions exportOptions) Map<SchedulerManager.ExportedContent,byte[]> exportDataMap(Map<Integer, Set<Integer>> elementsToExport, ExportOptions exportOptions) byte[]generateCompletePropertiesFileToImport(ImportData importData) Generates the complete properties file needed to import a Scheduler backup that was exported with properties.Gets the collection of all reports.getAllJobReports(int startIndex, int count) Gets the collection of all reports.getCacheJobsDataForVDPView(String viewName) Return a list of VDPCacheJobDataForVDPView objects representing the status of jobs using a particular view name on the scheduler server.Gets the cluster settings used by the server.Obtains the user authenticated against the scheduler this facade belongs to.Gets the database settings.getDataSource(int projectID, int elementID) Obtains the configuration of the given data source.Retrieves the collection of analyzers provided by Elastic.getElementByName(String projectName, String elementName, String type) Gets the configuration of an element by its name, its type and the name of the project it belongs to.getElementsBySubType(int projectID, String type, String subType) Gets the collection of elements of the given type and subType associated to the specified project.getElementsByType(int projectID, String type) Gets the collection of elements of the given type associated to the specified project.getElementSubTypes(String type) Obtains all the subTypes for the given element type with their meta-configuration available in the system.getElementsUsedByElement(int elementID) Gets the elements used by an specified configuration element.Obtains all the types of elements with their meta-configuration available in the system.getExporterConfigurationByName(int projectID, int jobID, String exporterName) Obtains the exporter configuration from the job it belongs to.getJDBCDriver(long id) Obtains the JDBC driver registered in the scheduler with that identifier.Obtains the collection of JDBC drivers registered in the scheduler.getJob(int projectID, int elementID) Obtains the configuration of the given job.getJobDependents(Integer jobId) Obtains the collection of job identifiers that have dependencies with the specified job.getJobInformation(int projectID, int jobID) Returns the JobData object that represents the currently job in the scheduler server.getJobInformation(String projectName, String jobName) Returns the JobData object that represents the currently job in the scheduler server.getJobReports(int projectID, int jobID, int startIndex, int count) Gets the collection of reports associated to the given job.Returns a list of JobData objects that represent all current jobs in the scheduler server.getJobsInformation(List<Integer> jobIDs) Returns a list of JobData objects that represent the status of the asked jobs in the scheduler server.Gets the kerberos settings used by the server.com.denodo.util.logging.LogConfigurationGets the active loggers.Gets the mail configuration used by the server.getMetaConfiguration(String type, String subType) Obtains theMetaConfigurationfor the element matching the specified type and subType.getMetaConfigurations(String type) Obtains a Collection ofMetaConfiguration.Obtains the collection of plugins (custom element implementation) registered in the scheduler.getProject(int projectID) Obtains the project with the specified identifier.getProject(String projectName) Obtains the project with the specified name.Obtains the current projects in the system.Gets a map mapping the configuration elements with the project identifier they belong to.getProjectsByElement(String type) Gets a map mapping the configuration elements of the specified type with the project identifier they belong to.getReport(int reportID) Gets the job report .getReportMailContentAsHtml(int reportID) Gets the HTML of a report mail applying the template XSLT.Obtains the permissions configured for the given role name.Obtains the names and descriptions of the roles stored in the server.getRoles()Obtains the roles and their permissions stored in the server, already merged with the ones coming from VDP.Gets the Scheduler server running mode.getServerData(boolean refresh) Gets the Server Principal Name of this Scheduler server.Gets the port numbers used by the server.Gets the server settings.Gets the roles (with their permissions) the authenticated user has assigned.getVDPCacheJobsDataForVDPView(String viewName) Deprecated.Deprecated since 9.2.0.Gets the VDP data source settings.Gets the manager to introspect a VDP server.importData(byte[] backupFile, boolean replace) Imports a Scheduler backup in the server.importData(ImportData importData, ImportOptions importOptions) Imports a Scheduler backup in the server.importData(ImportData importData, Map<String, Map<String, Set<String>>> elementsToImport, ImportOptions importOptions) Imports a Scheduler backup in the server.importDataContents(byte[] backupFile) Shows the contents (projects with their jobs, data sources) of a zip file that represents a Scheduler backup.Imports the roles created in the VDP Server.voidInitializes the scheduler manager using the provided context.booleanisBackupWithSettings(byte[] backupFile) Shows if a Scheduler backup contains settings files (resources directory).booleanisImportDataWithProperties(byte[] backupFile) Returns true if the zip file that represents a Scheduler backup contains the properties inside.booleanisUserAuthorizedToExecute(String methodFirm, Object... args) Checks if the current user is authorized to perform some operation over the server.voidlogout()Method to logout the user from the server.moveDataSourceToProject(int projectID, Configuration config, int destinationProjectID) Modifies the configuration of the data source and saves it in the target project.moveJobToProject(int projectID, Configuration config, int destinationProjectID) Modifies the configuration of the job and saves it in the target project.voidpauseJob(int projectID, int jobID) Pauses the given job if it is not in its execution phase.pauseJob(int projectID, Collection<Integer> jobID) Pauses the given jobs if they are not in their execution phase.booleanPauses the scheduler server if there are no jobs in its execution phase.voidping()Ping Scheduler server.voidRemoves all the reports by recreating the reports table.voidremoveDataSource(int projectID, int elementID) Removes the data source with the specified identifier.removeDataSources(int projectID, Collection<Integer> elementID) Removes the datasources with the specified identifier.voidremoveJDBCDriver(long driverID) Removes the specified JDBC driver.voidremoveJDBCDriver(String dbAdapter, String dbVersion) Removes the JDBC driver for the specified database and version.voidremoveJob(int projectID, int elementID) Removes the job with the specified identifier.voidremoveJobReports(int projectID, int jobID) Removes all reports associated to the given job.removeJobReports(int projectID, Collection<Integer> jobID) Removes all reports associated to the given jobs.removeJobs(int projectID, Collection<Integer> elementID) Removes the jobs with the specified identifier.voidremovePlugin(String pluginName) Removes the plugin (custom element implementation) with the specified identifier and its metadata.voidremoveProject(int projectID) Removes the project with the specified identifier and all the configuration elements that belong to the project (e.g.removeProjects(Collection<Integer> projectID) Removes the projects with the specified identifiers and all the configuration elements that belong to the projects (e.g.voidremoveRole(String roleName) Removes the role with the specified name.removeRoles(Set<String> roleNames) Removes the roles with the specified names.replicateDataSource(int projectID, String newName, Configuration config) Replicates a data source by cloning a given one an setting a new name for the data source.replicateJob(int projectID, String newName, Configuration config) Replicates a job by cloning a given one an setting a new name for the job.voidreplicateRole(String existingRoleName, String newRoleName) Creates a new role using the given new name and the permissions of the copied role.voidresumeJob(int projectID, int jobID) Resumes the job execution.resumeJob(int projectID, Collection<Integer> jobID) Resumes the jobs execution.voidResumes the scheduler server execution.voidretryOrContinueJob(int projectID, int jobID) Executes the given job once retrying the errors occured (if any) during the last execution of the job and executing queries not yet executed (if any) for some unexpected error.retryOrContinueJob(int projectID, Collection<Integer> jobID) Executes the given job once retrying the errors occured (if any) during the last execution of the job and executing queries not yet executed (if any) for some unexpected error.voidsetLogLevel(String loggerName, String logLevel) Sets the log level for the loggerName.voidTemporarily halts the Scheduler's firing of Triggers.booleanStarts the batch mode for the user's session.voidstartJob(int projectID, int jobID) Executes the given job once.startJob(int projectID, Collection<Integer> jobID) Executes the given job once.voidstartJobWithDependencies(int projectID, int jobID) Executes the given job once with its dependencies (if any).startJobWithDependencies(int projectID, Collection<Integer> jobID) Executes the given job once with its dependencies (if any).booleanstopBatchMode(boolean confirmChanges) Stops the batch mode for the user's session.voidstopJob(int projectID, int jobID) Stops the given job if it was being executed.stopJob(int projectID, Collection<Integer> jobID) Stops the given jobs if they were being executed.booleantestMailConfiguration(Collection<String> recipients) Tests the already saved configuration of the mail server, which will be used by the Mail Handler.booleantestMailConfiguration(Collection<String> recipients, MailConfig mailConfig) Tests the configuration of the mail server passed as argument.updateDataSource(int projectID, Configuration config) Modifies the configuration of the element.updateJob(int projectID, Configuration config) Modifies the configuration of the job.updateMailConfiguration(MailConfig mailConfig) Modifies the configuration of the mail server used by the mail handler.updateProject(Item project) Modifies the configuration of the project.
-
Method Details
-
init
Initializes the scheduler manager using the provided context.- Parameters:
context- a context for locating and initializing the scheduler manager.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.AuthenticationException- if an authentication error occurs. Typically when the credentials supplied by the user are invalid.InternalErrorException- if an error occurs during the process.
-
changePassword
void changePassword(String oldClearPassword, String newClearPassword) throws ConnectException, AuthenticationException, InternalErrorException Method that allows clients to modify their passwords they use to log on to the server.- Parameters:
oldClearPassword- the current password of the user.newClearPassword- the password of the user.- Throws:
AuthenticationException- if an authentication error occurs. Typically when the credentials supplied by the user are invalid.ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if a severe error occurs.
-
getCurrentUser
Obtains the user authenticated against the scheduler this facade belongs to.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.
-
logout
Method to logout the user from the server.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.
-
isUserAuthorizedToExecute
boolean isUserAuthorizedToExecute(String methodFirm, Object... args) throws ConnectException, InternalErrorException Checks if the current user is authorized to perform some operation over the server.- Parameters:
methodFirm- The firm of the method the user wants to execute.args- The method arguments.- Returns:
- True if the user has permissions; false otherwise.
- Throws:
ConnectException- If a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if a severe error occurs.
-
addProject
ProjectView addProject(String name, String description) throws ConnectException, DuplicateInstanceException, InternalErrorException Creates a new project using the default structure from the template configuration fileproject-template.xml.- Parameters:
name- the name of the project.description- the description of the project.- Returns:
- a
ProjectViewwith theItemwithprojectNameas thecurrentProjectand a Collection of Item (currentProject) is not included), each encapsulating the basic information of a project, not including its children or values (if any). - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.DuplicateInstanceException- if a project with the same name already exists.InternalErrorException- if an error occurs during the process.
-
getProject
ProjectView getProject(int projectID) throws ConnectException, InstanceNotFoundException, InternalErrorException Obtains the project with the specified identifier.- Parameters:
projectID- identifier of the project.- Returns:
- a
ProjectViewwith theItemwithprojectIDas thecurrentProjectand a Collection of Item (currentProject) is not included), each encapsulating the basic information of a project, not including its children or values (if any). - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no project with the specified identifier could be found.InternalErrorException- if an error occurs during the process.
-
getProject
ProjectView getProject(String projectName) throws ConnectException, InstanceNotFoundException, InternalErrorException Obtains the project with the specified name.- Parameters:
projectName- name of the project.- Returns:
- a
ProjectViewwith theItemwithprojectNameas thecurrentProjectand a Collection of Item (currentProject) is not included), each encapsulating the basic information of a project, not including its children or values (if any). - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no project with the specified identifier could be found.InternalErrorException- if an error occurs during the process.
-
getProjects
Obtains the current projects in the system.- Returns:
- a Collection of Item, each encapsulating the basic information of a project, not including its children or values (if any).
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
updateProject
Item updateProject(Item project) throws ConnectException, DuplicateInstanceException, InstanceNotFoundException, InternalErrorException Modifies the configuration of the project.- Parameters:
project- the configuration of the project.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.DuplicateInstanceException- if the project name is modified and a project with the same name already exists.InstanceNotFoundException- if the project does not exist.InternalErrorException- if an error occurs during the process.
-
removeProject
void removeProject(int projectID) throws ConnectException, InstanceNotFoundException, InternalErrorException Removes the project with the specified identifier and all the configuration elements that belong to the project (e.g. dataSources, jobs...)- Parameters:
projectID- the identifier of the project.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no project with the specified identifier could be found.InternalErrorException- if an error occurs during the process.
-
removeProjects
Map<Integer,String> removeProjects(Collection<Integer> projectID) throws ConnectException, InternalErrorException Removes the projects with the specified identifiers and all the configuration elements that belong to the projects (e.g. dataSources, jobs...)- Parameters:
projectID- Collection of project identifiers- Returns:
- Map of projects that could not be deleted. This map is indexed by the project identifier and the value is the error message.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInternalErrorException- if an error occurs during the process
-
addDataSource
Configuration addDataSource(int projectID, Configuration config) throws ConnectException, DuplicateInstanceException, InternalErrorException Creates a new data source using the given configuration and associates it to the specified project. Also updates the project configuration with the new element.- Parameters:
projectID- the identifier of the projectconfig- the configuration of the new data source- Returns:
- The
Configurationof the created data source - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyDuplicateInstanceException- if an element with the same name already existsInternalErrorException- if an error occurs during the process
-
addJob
Configuration addJob(int projectID, Configuration config) throws ConnectException, DuplicateInstanceException, InternalErrorException Creates a new job using the given configuration and associates it to the specified project. Also updates the project configuration with the new element.- Parameters:
projectID- the identifier of the projectconfig- the configuration of the new job- Returns:
- The
Configurationof the created job - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyDuplicateInstanceException- if an element with the same name already existsJobLimitExceededException- if new element (job) cannot be createdInternalErrorException- if an error occurs during the process
-
replicateDataSource
Configuration replicateDataSource(int projectID, String newName, Configuration config) throws ConnectException, DuplicateInstanceException, InternalErrorException Replicates a data source by cloning a given one an setting a new name for the data source.- Parameters:
projectID- the project idnewName- the name for the replicated data sourceconfig- TheConfigurationof the data source to be replicated- Returns:
- The
Configurationof the replicated data source - Throws:
ConnectExceptionDuplicateInstanceExceptionInternalErrorException
-
replicateJob
Configuration replicateJob(int projectID, String newName, Configuration config) throws ConnectException, DuplicateInstanceException, InternalErrorException Replicates a job by cloning a given one an setting a new name for the job.- Parameters:
projectID- the project idnewName- the name for the replicated jobconfig- TheConfigurationof the job to be replicated- Returns:
- The
Configurationof the replicated job - Throws:
ConnectExceptionDuplicateInstanceExceptionInternalErrorException
-
getDataSource
Configuration getDataSource(int projectID, int elementID) throws ConnectException, InstanceNotFoundException, InternalErrorException Obtains the configuration of the given data source.- Parameters:
projectID- the project idelementID- identifier of the data source.- Returns:
- the
Configuration. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no data source with the specified identifier could be found.InternalErrorException- if an error occurs during the process.
-
getJob
Configuration getJob(int projectID, int elementID) throws ConnectException, InstanceNotFoundException, InternalErrorException Obtains the configuration of the given job.- Parameters:
projectID- the project idelementID- identifier of the job.- Returns:
- the
Configuration. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no job with the specified identifier could be found.InternalErrorException- if an error occurs during the process.
-
getElementsByType
Collection<Configuration> getElementsByType(int projectID, String type) throws ConnectException, InternalErrorException Gets the collection of elements of the given type associated to the specified project.- Parameters:
projectID- identifier of the project.type- the type of the elements required.- Returns:
- a Collection of
Configuration - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getElementsBySubType
Collection<Configuration> getElementsBySubType(int projectID, String type, String subType) throws ConnectException, InternalErrorException Gets the collection of elements of the given type and subType associated to the specified project.- Parameters:
projectID- identifier of the project.type- the type of the elements required.subType- the subType of the elements required.- Returns:
- a Collection of
Configuration - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getElementByName
Configuration getElementByName(String projectName, String elementName, String type) throws ConnectException, InstanceNotFoundException, InternalErrorException Gets the configuration of an element by its name, its type and the name of the project it belongs to.- Parameters:
projectName- the name of the project the element belongs to.elementName- the name of the searched element.type- the type of the element required.- Returns:
- the
Configuration. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no element with the specified name could be found.InternalErrorException- if an error occurs during the process.
-
getProjectsByElement
Map<Integer,Integer> getProjectsByElement(String type) throws ConnectException, InternalErrorException Gets a map mapping the configuration elements of the specified type with the project identifier they belong to.- Parameters:
type- the type of the elements required.- Returns:
- the map {elementID, projectID}.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getProjectsByElement
Gets a map mapping the configuration elements with the project identifier they belong to.- Returns:
- the map {elementID, projectID}.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getElementsUsedByElement
Map<String,Set<Configuration>> getElementsUsedByElement(int elementID) throws ConnectException, InstanceNotFoundException, InternalErrorException Gets the elements used by an specified configuration element. For instance, a job can use another jobs, data sources in its configuration.- Parameters:
elementID- the specified element to search the configuration elements it depends on.- Returns:
- the map {element type, configurations}.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if the element does not exist.InternalErrorException- if an error occurs during the process.
-
updateDataSource
Configuration updateDataSource(int projectID, Configuration config) throws ConnectException, InstanceNotFoundException, DuplicateInstanceException, InternalErrorException Modifies the configuration of the element. Also updates the project configuration if the element name is modified.- Parameters:
projectID- Identifier of the projectconfig- the configuration of the element.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyDuplicateInstanceException- if the data source name is modified and an data source with the same name already existsInstanceNotFoundException- if the data source does not existInternalErrorException- if an error occurs during the process
-
moveDataSourceToProject
Configuration moveDataSourceToProject(int projectID, Configuration config, int destinationProjectID) throws ConnectException, InstanceNotFoundException, DuplicateInstanceException, InternalErrorException Modifies the configuration of the data source and saves it in the target project. Also updates the project configuration if the data source name is modified.- Parameters:
projectID- Identifier of the projectconfig- the configuration of the data source.destinationProjectID- Identifier of the project where the data source will be moved to.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyDuplicateInstanceException- if the data source name is modified and an data source with the same name already existsInstanceNotFoundException- if the data source does not existInternalErrorException- if an error occurs during the process
-
updateJob
Configuration updateJob(int projectID, Configuration config) throws ConnectException, InstanceNotFoundException, DuplicateInstanceException, InternalErrorException Modifies the configuration of the job. Also updates the project configuration if the element name is modified.- Parameters:
projectID- Identifier of the projectconfig- TheConfigurationof the job- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyDuplicateInstanceException- if the job name is modified and an job with the same name already existsInstanceNotFoundException- if the job does not existInternalErrorException- if an error occurs during the processJobLimitExceededException- if new element (job) cannot be createdInternalErrorException- if an error occurs during the process.
-
moveJobToProject
Configuration moveJobToProject(int projectID, Configuration config, int destinationProjectID) throws ConnectException, InstanceNotFoundException, DuplicateInstanceException, InternalErrorException Modifies the configuration of the job and saves it in the target project. Also updates the project configuration if the job name is modified.- Parameters:
projectID- Identifier of the projectconfig- the configuration of the job.destinationProjectID- Identifier of the project where the job will be moved to.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyDuplicateInstanceException- if the job name is modified and a job with the same name already existsInstanceNotFoundException- if the job does not existInternalErrorException- if an error occurs during the process
-
removeDataSource
void removeDataSource(int projectID, int elementID) throws ConnectException, InstanceNotFoundException, InternalErrorException Removes the data source with the specified identifier. Also updates the project configuration removing the data source from it.- Parameters:
projectID- Identifier of the projectelementID- the identifier of the data source- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInstanceNotFoundException- if no data source with the specified identifier could be foundInternalErrorException- if an error occurs during the process
-
removeJob
void removeJob(int projectID, int elementID) throws ConnectException, InstanceNotFoundException, InternalErrorException Removes the job with the specified identifier. Also updates the project configuration removing the job from it.- Parameters:
projectID- Identifier of the projectelementID- the identifier of the job- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInstanceNotFoundException- if no job with the specified identifier could be foundInternalErrorException- if an error occurs during the process
-
removeDataSources
Map<Integer,String> removeDataSources(int projectID, Collection<Integer> elementID) throws ConnectException, InternalErrorException Removes the datasources with the specified identifier. Also updates the project configuration removing the data source from it.- Parameters:
projectID- the identifier of the projectelementID- Collection of data source identifiers- Returns:
- Map of jobs that could not be deleted. This map is indexed by the job identifier and the value is the error message.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInternalErrorException- if an error occurs during the process
-
removeJobs
Map<Integer,String> removeJobs(int projectID, Collection<Integer> elementID) throws ConnectException, InternalErrorException Removes the jobs with the specified identifier. Also updates the project configuration removing the job from it.- Parameters:
projectID- the identifier of the projectelementID- Collection of job identifiers- Returns:
- Map of jobs that could not be deleted. This map is indexed by the job identifier and the value is the error message.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInternalErrorException- if an error occurs during the process
-
getElementTypes
Obtains all the types of elements with their meta-configuration available in the system.- Returns:
- Collection of String
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if a severe error occurs.
-
getElementSubTypes
Collection<String> getElementSubTypes(String type) throws ConnectException, InstanceNotFoundException, InternalErrorException Obtains all the subTypes for the given element type with their meta-configuration available in the system.- Parameters:
type-- Returns:
- Collection of String
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no element with the specified type could be found.InternalErrorException- if a severe error occurs.
-
getMetaConfigurations
Collection<MetaConfiguration> getMetaConfigurations(String type) throws ConnectException, InstanceNotFoundException, InternalErrorException Obtains a Collection ofMetaConfiguration. If the element is categorized according to its type its meta-configuration is returned. If the element is categorized according to its type and subtype the meta-configuration of all its subTypes is returned.- Parameters:
type-- Returns:
- Collection of MetaConfiguration
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no element with the specified type could be found.InternalErrorException- if a severe error occurs.
-
getMetaConfiguration
MetaConfiguration getMetaConfiguration(String type, String subType) throws ConnectException, InstanceNotFoundException, InternalErrorException Obtains theMetaConfigurationfor the element matching the specified type and subType.- Parameters:
type-subType-- Returns:
- MetaConfiguration the meta-configuration of the element matching the given type and subType.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no element with the specified type and subType could be found.InternalErrorException- if a severe error occurs.
-
getJobDependents
Collection<Integer> getJobDependents(Integer jobId) throws ConnectException, InstanceNotFoundException, InternalErrorException Obtains the collection of job identifiers that have dependencies with the specified job.- Parameters:
jobId-- Returns:
- Collection The collection of job identifier that have dependencies with this job.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no element with the specified type and subType could be found.InternalErrorException- if a severe error occurs.
-
getExporterConfigurationByName
Configuration getExporterConfigurationByName(int projectID, int jobID, String exporterName) throws ConnectException, InstanceNotFoundException, InternalErrorException Obtains the exporter configuration from the job it belongs to.- Parameters:
projectID- the project identifier.jobID- the identifier of the job that owns the exporter.exporterName- the name of the exporter whichConfigurationwants to be retrieved. This name is the exporter key stored in the map of exported resources in the job report.- Returns:
- the exporter Configuration for the required exporter, if it exists.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no job with the specified identifier could be found.InternalErrorException- if a severe error occurs.
-
addPlugin
PluginInfo addPlugin(String fileName, byte[] fileContents) throws ConnectException, DuplicateInstanceException, InternalErrorException Adds a new plugin (custom element implementation) to the scheduler. The plugin jar file is copied to the plugin folder of the application. The plugin manifest file should include a section started with an attribute with the name as "Name" and value "CustomElement". This section should contain three attributes:- "PluginType": the type of the custom element the plugin implements
- "PluginName": the unique identifier of the custom element the plugin implements, the name acts as the subtype of the element too
- "PluginClass": the implementation class name of the custom element
- Parameters:
fileName- the name of the plugin jar file, that is the last name in the pathname's name sequence.fileContents- a byte array with the plugin jar file contents.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.DuplicateInstanceException- if a plugin with the same name already exists.InternalErrorException- if a severe error occurs.
-
getPlugins
Obtains the collection of plugins (custom element implementation) registered in the scheduler.- Returns:
- a Collection of
PluginInfo. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if a severe error occurs.
-
removePlugin
void removePlugin(String pluginName) throws ConnectException, InstanceNotFoundException, InternalErrorException Removes the plugin (custom element implementation) with the specified identifier and its metadata. Also removes all the configuration elements that matches the type and subtype (the plugin name) of the plugin removed.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if the plugin does not exist.InternalErrorException- if a severe error occurs.
-
addJDBCDriver
DriverInfo addJDBCDriver(Set<com.denodo.util.Pair<String, byte[]>> files, String dataBaseAdapter, String version, String className, String uriTemplate) throws ConnectException, DuplicateInstanceException, InternalErrorExceptionAdds a new jdbc driver to the scheduler. The driver jar file is copied to the drivers folder of the application and a new entry is created in the database.- Parameters:
files- a set of jar files that conform the classpath of this driver. Each entry of the set is aPairof {fileName, fileContents}.dataBaseAdapter- name of the DBMS.version- DBMS version.className- the driver class name.uriTemplate- uri template to connect to the database.- Returns:
- a
DriverInfowith the information about the added driver. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.DuplicateInstanceException- if a driver with the same name already exists.InternalErrorException- if a severe error occurs.
-
getJDBCDrivers
Obtains the collection of JDBC drivers registered in the scheduler.- Returns:
- a Collection of
DriverInfo. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if a severe error occurs.
-
getJDBCDriver
DriverInfo getJDBCDriver(long id) throws ConnectException, InstanceNotFoundException, InternalErrorException Obtains the JDBC driver registered in the scheduler with that identifier.- Returns:
- a
DriverInfo. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if the element does not exist.InternalErrorException- if a severe error occurs.
-
removeJDBCDriver
void removeJDBCDriver(String dbAdapter, String dbVersion) throws ConnectException, InstanceNotFoundException, InternalErrorException Removes the JDBC driver for the specified database and version.- Parameters:
dbAdapter-dbVersion-- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if the driver does not exist.InternalErrorException- if a severe error occurs.IllegalOperationException- if user tries to remove a driver registered by "SYSTEM" user.
-
removeJDBCDriver
void removeJDBCDriver(long driverID) throws ConnectException, InstanceNotFoundException, InternalErrorException Removes the specified JDBC driver.- Parameters:
driverID- the driver identifier- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if the driver does not exist.InternalErrorException- if a severe error occurs.IllegalOperationException- if user tries to remove a driver registered by "SYSTEM" user.
-
getJobReports
JobReportChunk getJobReports(int projectID, int jobID, int startIndex, int count) throws ConnectException, InstanceNotFoundException, InternalErrorException Gets the collection of reports associated to the given job.- Parameters:
projectID- the identifier of the projectjobID- identifier of the jobstartIndex- the index (starting from 1) of the first report to returncount- the maximum number of reports to return- Returns:
- returns a
JobReportChunkwith the job reports - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInstanceNotFoundException- if the job does not exist.InternalErrorException- if an error occurs during the process
-
getAllJobReports
Gets the collection of all reports.- Returns:
- returns a
JobReportChunkwith the job reports - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInternalErrorException- if an error occurs during the process
-
getAllJobReports
JobReportChunk getAllJobReports(int startIndex, int count) throws ConnectException, InternalErrorException Gets the collection of all reports.- Parameters:
startIndex- the index (starting from 1) of the first report to returncount- the maximum number of reports to return- Returns:
- returns a
JobReportChunkwith the job reports - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInternalErrorException- if an error occurs during the process
-
getReport
JobReport getReport(int reportID) throws ConnectException, InstanceNotFoundException, InternalErrorException Gets the job report .- Parameters:
reportID- identifier of the report.- Returns:
- returns a
JobReportwith the job report requested. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if the report does not exist.InternalErrorException- if an error occurs during the process.
-
getReportMailContentAsHtml
String getReportMailContentAsHtml(int reportID) throws ConnectException, InstanceNotFoundException, InternalErrorException Gets the HTML of a report mail applying the template XSLT.- Parameters:
reportID- identifier of the report.- Returns:
- returns the HTML in a String
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if the report does not exist.InternalErrorException- if an error occurs during the process.
-
removeJobReports
void removeJobReports(int projectID, int jobID) throws ConnectException, InstanceNotFoundException, InternalErrorException Removes all reports associated to the given job.- Parameters:
projectID- the identifier of the projectjobID- identifier of the job- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInstanceNotFoundException- if the job does not existInternalErrorException- if an error occurs during the process
-
removeJobReports
Map<Integer,String> removeJobReports(int projectID, Collection<Integer> jobID) throws ConnectException, InternalErrorException Removes all reports associated to the given jobs.- Parameters:
projectID- the identifier of the projectjobID- identifiers of the jobs- Returns:
- Map of jobs which reports could not be deleted. This map is indexed by the job identifier and the value is the error message.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInternalErrorException- if an error occurs during the process
-
removeAllReports
Removes all the reports by recreating the reports table.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
compressReportsTable
Compresses the job reports table in database.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
startJob
void startJob(int projectID, int jobID) throws ConnectException, InstanceNotFoundException, InternalErrorException Executes the given job once.- Parameters:
projectID- the identifier of the projectjobID- the identifier of the job- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInstanceNotFoundException- if the job does not existInternalErrorException- if an error occurs during the process
-
startJob
Map<Integer,String> startJob(int projectID, Collection<Integer> jobID) throws ConnectException, InternalErrorException Executes the given job once.- Parameters:
projectID- the identifier of the projectjobID- the identifier of the jobs- Returns:
- Map of jobs that could not be started. This map is indexed by the job identifier and the value is the error message.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInternalErrorException- if an error occurs during the process
-
stopJob
void stopJob(int projectID, int jobID) throws ConnectException, InstanceNotFoundException, InternalErrorException Stops the given job if it was being executed.- Parameters:
projectID- the identifier of the projectjobID- the identifier of the job- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInstanceNotFoundException- if the job does not existInternalErrorException- if an error occurs during the process
-
stopJob
Map<Integer,String> stopJob(int projectID, Collection<Integer> jobID) throws ConnectException, InternalErrorException Stops the given jobs if they were being executed.- Parameters:
projectID- the identifier of the projectjobID- the identifiers of the jobs- Returns:
- Map of jobs that could not be stopped. This map is indexed by the job identifier and the value is the error message.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInternalErrorException- if an error occurs during the process
-
retryOrContinueJob
void retryOrContinueJob(int projectID, int jobID) throws ConnectException, InstanceNotFoundException, InternalErrorException Executes the given job once retrying the errors occured (if any) during the last execution of the job and executing queries not yet executed (if any) for some unexpected error.- Parameters:
projectID- the identifier of the projectjobID- the identifier of the job- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInstanceNotFoundException- if the job does not existInternalErrorException- if an error occurs during the process
-
retryOrContinueJob
Map<Integer,String> retryOrContinueJob(int projectID, Collection<Integer> jobID) throws ConnectException, InternalErrorException Executes the given job once retrying the errors occured (if any) during the last execution of the job and executing queries not yet executed (if any) for some unexpected error.- Parameters:
projectID- the identifier of the projectjobID- the identifier of the jobs- Returns:
- Map of jobs that could not be retried. This map is indexed by the job identifier and the value is the error message.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInternalErrorException- if an error occurs during the process
-
startJobWithDependencies
void startJobWithDependencies(int projectID, int jobID) throws ConnectException, InstanceNotFoundException, InternalErrorException Executes the given job once with its dependencies (if any).- Parameters:
projectID- the identifier of the projectjobID- the identifier of the job- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInstanceNotFoundException- if the job does not existInternalErrorException- if an error occurs during the process
-
startJobWithDependencies
Map<Integer,String> startJobWithDependencies(int projectID, Collection<Integer> jobID) throws ConnectException, InternalErrorException Executes the given job once with its dependencies (if any).- Parameters:
projectID- the identifier of the projectjobID- the identifier of the jobs- Returns:
- Map of jobs that could not be started. This map is indexed by the job identifier and the value is the error message.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInternalErrorException- if an error occurs during the process
-
pauseJob
void pauseJob(int projectID, int jobID) throws ConnectException, InstanceNotFoundException, InternalErrorException Pauses the given job if it is not in its execution phase.- Parameters:
projectID- the identifier of the projectjobID- the identifier of the job- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInstanceNotFoundException- if the job does not existInternalErrorException- if an error occurs during the process
-
pauseJob
Map<Integer,String> pauseJob(int projectID, Collection<Integer> jobID) throws ConnectException, InternalErrorException Pauses the given jobs if they are not in their execution phase.- Parameters:
projectID- the identifier of the projectjobID- the identifiers of the jobs- Returns:
- Map of jobs that could not be disabled. This map is indexed by the job identifier and the value is the error message.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInternalErrorException- if an error occurs during the process
-
resumeJob
void resumeJob(int projectID, int jobID) throws ConnectException, InstanceNotFoundException, InternalErrorException Resumes the job execution.- Parameters:
projectID- the identifier of the projectjobID- the identifier of the job- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInstanceNotFoundException- if the job does not existInternalErrorException- if an error occurs during the process
-
resumeJob
Map<Integer,String> resumeJob(int projectID, Collection<Integer> jobID) throws ConnectException, InternalErrorException Resumes the jobs execution.- Parameters:
projectID- the identifier of the projectjobID- the identifier of the jobs- Returns:
- Map of jobs that could not be enabled. This map is indexed by the job identifier and the value is the error message.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInternalErrorException- if an error occurs during the process
-
pauseScheduler
Pauses the scheduler server if there are no jobs in its execution phase.- Returns:
- true if the scheduler was paused.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
standByScheduler
Temporarily halts the Scheduler's firing of Triggers.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
resumeScheduler
Resumes the scheduler server execution.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getJobsInformation
Returns a list of JobData objects that represent all current jobs in the scheduler server. Note that the list returned is an 'instantaneous' snap-shot, and that as soon as it's returned, the true list of jobs, their states and results may be different.- Returns:
- a Collection of
JobData - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getJobsInformation
Collection<JobData> getJobsInformation(List<Integer> jobIDs) throws ConnectException, InternalErrorException Returns a list of JobData objects that represent the status of the asked jobs in the scheduler server. Note that the list returned is an 'instantaneous' snap-shot, and that as soon as it's returned, their states and results may be different.- Parameters:
jobIDs- the identifier of the jobs- Returns:
- a Collection of
JobData - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getVDPCacheJobsDataForVDPView
@Deprecated Collection<VDPCacheJobDataForVDPView> getVDPCacheJobsDataForVDPView(String viewName) throws ConnectException, InternalErrorException Deprecated.Deprecated since 9.2.0. UsegetCacheJobsDataForVDPView(String)instead. Return a list of VDPCacheJobDataForVDPView objects representing the status of jobs using a particular view name on the scheduler server. Note that the list returned is an 'instantaneous' snap-shot, and that as soon as it's returned, the true list of jobs, its states and results may be different.- Parameters:
viewName- The view name used in the jobs.- Returns:
- a Collection of
VDPCacheJobDataForVDPView - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getCacheJobsDataForVDPView
Collection<VDPCacheJobDataForVDPView> getCacheJobsDataForVDPView(String viewName) throws ConnectException, InternalErrorException Return a list of VDPCacheJobDataForVDPView objects representing the status of jobs using a particular view name on the scheduler server. Note that the list returned is an 'instantaneous' snap-shot, and that as soon as it's returned, the true list of jobs, its states and results may be different.- Parameters:
viewName- The view name used in the jobs.- Returns:
- a Collection of
VDPCacheJobDataForVDPView - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getJobInformation
JobData getJobInformation(int projectID, int jobID) throws ConnectException, InstanceNotFoundException, InternalErrorException Returns the JobData object that represents the currently job in the scheduler server. Note that the value returned is an 'instantaneous' snap-shot, and that as soon as it's returned, the true states and results may be different.- Parameters:
projectID- the identifier of the projectjobID- the identifier of the job- Returns:
- a
JobDatarepresenting the state of the job. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no role with the specified name could be found.InternalErrorException- if an error occurs during the process.
-
getJobInformation
JobData getJobInformation(String projectName, String jobName) throws ConnectException, InstanceNotFoundException, InternalErrorException Returns the JobData object that represents the currently job in the scheduler server. Note that the value returned is an 'instantaneous' snap-shot, and that as soon as it's returned, the true states and results may be different.- Parameters:
projectName- the name of the projectjobName- the name of the job- Returns:
- a
JobDatarepresenting the state of the job. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no role with the specified name could be found.InternalErrorException- if an error occurs during the process.
-
getServerPorts
Gets the port numbers used by the server.- Returns:
- a
ServerPorts. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
changeServerPorts
Modifies the port numbers used by the server.- Parameters:
ports-ServerPorts.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getServerSettings
Gets the server settings.- Returns:
- a
ServerSettings. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
changeServerSettings
ServerSettings changeServerSettings(ServerSettings settings) throws ConnectException, InternalErrorException Modifies the server settings.- Parameters:
settings-ServerSettings.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.IllegalArgumentException- if corePoolSize, or keepAliveTime less than zero, or if maxPoolSize less than or equal to zero, or if corePoolSize greater than maxPoolSize.InternalErrorException- if an error occurs during the process.
-
getMailConfiguration
Gets the mail configuration used by the server.- Returns:
- a
MailConfig. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
updateMailConfiguration
MailConfig updateMailConfiguration(MailConfig mailConfig) throws ConnectException, InternalErrorException Modifies the configuration of the mail server used by the mail handler.- Parameters:
mailConfig- the new mail configuration- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
testMailConfiguration
boolean testMailConfiguration(Collection<String> recipients) throws ConnectException, InternalErrorException Tests the already saved configuration of the mail server, which will be used by the Mail Handler.- Parameters:
recipients- lists of email addresses to send a testing email.- Returns:
- true if the email was successfully sent; false, otherwise.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
testMailConfiguration
boolean testMailConfiguration(Collection<String> recipients, MailConfig mailConfig) throws ConnectException, InternalErrorException Tests the configuration of the mail server passed as argument.- Parameters:
recipients- lists of email addresses to send a testing email.mailConfig- the mail configuration to be tested- Returns:
- true if the email was successfully sent; false, otherwise.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
importData
Map<String,Collection<String>> importData(byte[] backupFile, boolean replace) throws ConnectException, InternalErrorException Imports a Scheduler backup in the server.- Parameters:
backupFile- the Scheduler backup to be imported in the server.replace- whether to replace or not existing elements.- Returns:
- a
Mapwith theCollectionof warnings for each element imported. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
importData
Map<String,Collection<String>> importData(ImportData importData, ImportOptions importOptions) throws ConnectException, InternalErrorException Imports a Scheduler backup in the server.- Parameters:
importData- data to be imported in the server.importOptions- rules to apply in import- Returns:
- a
Mapwith theCollectionof warnings for each element imported. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
importData
Map<String,Collection<String>> importData(ImportData importData, Map<String, Map<String, throws ConnectException, InternalErrorExceptionSet<String>>> elementsToImport, ImportOptions importOptions) Imports a Scheduler backup in the server.- Parameters:
importData- data to be imported in the server.elementsToImport- aMapwith the elements to be imported. It has the project name as a key and as a value anotherMapwith the element type as a key and theCollectionof elements to be imported as a value.importOptions- rules to apply in import- Returns:
- a
Mapwith theCollectionof warnings for each element imported. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
importDataContents
Map<String,Map<String, importDataContentsSet<com.denodo.util.Pair<String, Boolean>>>> (byte[] backupFile) throws ConnectException, InternalErrorException Shows the contents (projects with their jobs, data sources) of a zip file that represents a Scheduler backup.- Parameters:
backupFile- the Scheduler backup to show its contents.- Returns:
- a
Mapthat contains the project name as a key and as the value aMapthat contains as a key the element type (data source or job) and as a value theSetof elements, indicating if they already exists on the server or not. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
isBackupWithSettings
Shows if a Scheduler backup contains settings files (resources directory).- Parameters:
backupFile- the Scheduler backup to check settings.- Returns:
- a true if backup contains settings, otherwise false.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
generateCompletePropertiesFileToImport
byte[] generateCompletePropertiesFileToImport(ImportData importData) throws ConnectException, InternalErrorException Generates the complete properties file needed to import a Scheduler backup that was exported with properties. If an input properties file is received, then the output file fulfills it with the missing ones.- Parameters:
importData- data to be imported in the server. return a byte[] with the contents of the generated properties file.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
isImportDataWithProperties
boolean isImportDataWithProperties(byte[] backupFile) throws ConnectException, InternalErrorException Returns true if the zip file that represents a Scheduler backup contains the properties inside.- Parameters:
backupFile- the Scheduler backup.- Returns:
- a true if the properties are contained inside the zip file; false, otherwise.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
exportData
- Parameters:
exportOptions-- Returns:
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
exportData
byte[] exportData(Collection<Integer> projectsToExport, ExportOptions exportOptions) throws ConnectException, InternalErrorException - Parameters:
projectsToExport-exportOptions-- Returns:
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
exportData
byte[] exportData(Map<Integer, Set<Integer>> elementsToExport, ExportOptions exportOptions) throws ConnectException, InternalErrorException- Parameters:
elementsToExport-exportOptions-- Returns:
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
exportDataMap
Map<SchedulerManager.ExportedContent,byte[]> exportDataMap(Map<Integer, Set<Integer>> elementsToExport, ExportOptions exportOptions) throws ConnectException, InternalErrorException- Parameters:
elementsToExport-exportOptions-- Returns:
- Throws:
ConnectExceptionInternalErrorException
-
assignPrivileges
void assignPrivileges(RoleInfo role) throws ConnectException, InstanceNotFoundException, InternalErrorException Assigns the privileges to a role, overriding its previous ones if the role existed, or creating it otherwise.- Parameters:
role- the configuration of the role.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no role with the specified name could be found.InternalErrorException- if an error occurs during the process.
-
getRoleNames
Obtains the names and descriptions of the roles stored in the server.- Returns:
- the
Set<RoleData>of roles. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getRoles
Obtains the roles and their permissions stored in the server, already merged with the ones coming from VDP.- Returns:
- the
Set<RoleInfo>of roles. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getRole
RoleInfo getRole(String roleName) throws ConnectException, InstanceNotFoundException, InternalErrorException Obtains the permissions configured for the given role name.- Parameters:
roleName- the name of the role.- Returns:
- the
RoleInfoof permissions associated to the role name. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no role with the specified name could be found.InternalErrorException- if an error occurs during the process.
-
replicateRole
void replicateRole(String existingRoleName, String newRoleName) throws ConnectException, InstanceNotFoundException, DuplicateInstanceException, InternalErrorException Creates a new role using the given new name and the permissions of the copied role.- Parameters:
existingRoleName- the name of the existing role.newRoleName- the name for the replicated role.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if the role does not exist.DuplicateInstanceException- if a role with the same name already exists.InternalErrorException- if an error occurs during the process.
-
removeRole
void removeRole(String roleName) throws ConnectException, InstanceNotFoundException, InternalErrorException Removes the role with the specified name.- Parameters:
roleName- the name of the role.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InstanceNotFoundException- if no role with the specified identifier could be found.InternalErrorException- if an error occurs during the process.
-
removeRoles
Removes the roles with the specified names.- Parameters:
roleNames- the names of the roles.- Returns:
- the collection of removed roles.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
importRoleNamesFromVDP
Imports the roles created in the VDP Server. Only a VDP user with administration privileges in Scheduler (with 'scheduler_admin' role) would be authorized to call this method. Note that local Scheduler users cannot invoke this method: in this case anIllegalOperationExceptionis thrown.- Returns:
- the
Set<RoleData>of roles from the VDP server - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInternalErrorException- if an error occurs during the processIllegalOperationException- if a local user invokes this method
-
getUserPermissionsByRole
Gets the roles (with their permissions) the authenticated user has assigned.- Returns:
- the
Set<RoleInfo>of the roles the authenticated user has assigned. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotelyInternalErrorException- if an error occurs during the process
-
getVDPDataSourceSettings
Gets the VDP data source settings.- Returns:
- a
VDPDataSourceSettings. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
changeVDPDataSourceSettings
VDPDataSourceSettings changeVDPDataSourceSettings(VDPDataSourceSettings settings) throws ConnectException, InternalErrorException Modifies the VDP data source settings.- Parameters:
settings-VDPDataSourceSettings.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getVDPManager
Gets the manager to introspect a VDP server.- Returns:
- the facade to introspect a VDP server.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getElasticSearchAnalyzers
Retrieves the collection of analyzers provided by Elastic.- Returns:
- the collection of analyzers provided by Elastic.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getClusterSettings
Gets the cluster settings used by the server.- Returns:
- a
ClusterConfigrepresenting the cluster configuration. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
changeClusterSettings
ClusterConfig changeClusterSettings(ClusterConfig cluster) throws ConnectException, InternalErrorException Modifies the cluster settings used by the server.- Parameters:
cluster-Cluster.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getDatabaseConfig
Gets the database settings.- Returns:
- a
DatabaseConfigrepresenting the database configuration for the metadata. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
changeDatabaseConfig
byte[] changeDatabaseConfig(DatabaseConfig settings, boolean exportCurrentMetadata, boolean checkConnectivity) throws ConnectException, InvalidConnectionException, InvalidTablesException, InternalErrorException Modifies the database settings and exports the current metadata if the user specifies it.- Parameters:
settings- the new database settings for the Scheduler metadata.exportCurrentMetadata- whether to export or not the current metadata, so that the user could import it in the new database.checkConnectivity- whether to check or not the connectivity against the new database.- Returns:
- the current metadata from the server, if asked.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InvalidConnectionException- if the new database is not accessible.InvalidTablesException- if the new database does not contain the metadata tables needed by Scheduler.InternalErrorException- if an error occurs during the process.
-
getKerberosSettings
Gets the kerberos settings used by the server.- Returns:
- a
KerberosSettingsrepresenting the kerberos properties. - Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
changeKerberosSettings
KerberosSettings changeKerberosSettings(KerberosSettings kerberosSettings) throws ConnectException, InternalErrorException Modifies the kerberos settings used by the server.- Parameters:
kerberosSettings- the newKerberosSettings.- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getServerKerberosPrincipal
Gets the Server Principal Name of this Scheduler server.- Returns:
- the kerberos server principal name (SPN) of the Scheduler server.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.
-
getSchedulerMode
Gets the Scheduler server running mode. It can be STANDALONE or CLOUD_AUTOMATIC (AWS_AUTOMATIC in old Scheduler servers)- Returns:
- STANDALONE or CLOUD_AUTOMATIC (or AWS_AUTOMATIC) String
- Throws:
ConnectExceptionInternalErrorException
-
getServerData
-
startBatchMode
Starts the batch mode for the user's session. This simulates a transaction, where the changes done are not persisted until the user confirms or rejects them with the {linkstopBatchMode(boolean)method. Nevertheless, the behavior for other connected users is not affected (it depends on the underlying database's transaction management).- Returns:
- boolean to indicate whether the transaction (batch mode) was successfully started or not.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.IllegalStateException- if the user's session is already in batch mode.
-
stopBatchMode
Stops the batch mode for the user's session. This mode has to be previously initiated with the {linkstartBatchMode()method.- Parameters:
confirmChanges-trueto commit the changes,falseto reject them.- Returns:
- boolean to indicate whether the transaction was successfully stopped or not.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.InternalErrorException- if an error occurs during the process.IllegalStateException- if trying to stop the batch mode and it was not previously started.
-
ping
Ping Scheduler server.- Throws:
InvalidConnectionException- if a connection error occurs. Typically, the connection was refused remotely.
-
getLogConfiguration
Gets the active loggers.- Returns:
- the list of loggers with their loggerName and its logLevel.
- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.
-
setLogLevel
Sets the log level for the loggerName.- Parameters:
loggerName-logLevel-- Throws:
ConnectException- if a connection error occurs. Typically, the connection was refused remotely.
-