Package com.almis.awe.service
Class MaintainService
java.lang.Object
com.almis.awe.config.ServiceConfig
com.almis.awe.service.MaintainService
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
Provides methods to insert/update/delete application data
- Author:
- Pablo GARCIA
-
Field Summary
-
Constructor Summary
ConstructorDescriptionMaintainService
(MaintainLauncher maintainLauncher, QueryUtil queryUtil, DatabaseConfigProperties databaseConfigProperties) Autowired constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
doCommit
(DatabaseConnection databaseConnection, String statementList, boolean manageConnection) Do maintain rollbackvoid
doRollback
(DatabaseConnection databaseConnection, String statementList, boolean manageConnection) Do maintain rollbackRetrieve database connectiongetDatabaseConnection
(com.fasterxml.jackson.databind.node.ObjectNode parameters) Retrieve database connection from parametersgetDatabaseConnection
(String alias) Get database connectiongetDatabaseConnection
(DataSource dataSource) Get database connectiongetMaintainList
(String search) Retrieve maintain listgetNextSequenceValue
(String sequence) Retrieve next sequence value (and increase sequence)getNextSequenceValue
(String sequence, DatabaseConnection databaseConnection) Retrieve next sequence value (and increase sequence)getNextSequenceValue
(String sequence, String databaseAlias) Retrieve next sequence value (and increase sequence)launchMaintain
(Target maintainTarget, com.fasterxml.jackson.databind.node.ObjectNode parameters, DatabaseConnection databaseConnection, boolean keepAliveConnection) Launches a maintainlaunchMaintain
(String maintainId) Launches a maintainlaunchMaintain
(String maintainId, DatabaseConnection databaseConnection, boolean keepAliveConnection) Launches one maintain with a connectionlaunchMaintain
(String maintainId, com.fasterxml.jackson.databind.node.ObjectNode parameters) Launches one maintain with parameterslaunchMaintain
(String maintainId, com.fasterxml.jackson.databind.node.ObjectNode parameters, DatabaseConnection databaseConnection, boolean keepAliveConnection) Launches one maintain with a connectionlaunchMaintain
(String maintainId, String alias) Launches a maintain with an aliasLaunch maintain action (from services)launchPrivateMaintain
(String maintainId) Launches a maintainlaunchPrivateMaintain
(String maintainId, DatabaseConnection databaseConnection, boolean keepAliveConnection) Launches one maintain with a connection without checking sessionlaunchPrivateMaintain
(String maintainId, com.fasterxml.jackson.databind.node.ObjectNode parameters) Launches one maintain with parameterslaunchPrivateMaintain
(String maintainId, com.fasterxml.jackson.databind.node.ObjectNode parameters, DatabaseConnection databaseConnection, boolean keepAliveConnection) Launches one maintain with a connection without checking sessionlaunchPrivateMaintain
(String maintainId, String alias) Launches a maintain with an aliasMethods inherited from class com.almis.awe.config.ServiceConfig
containsBean, getApplicationContext, getBean, getBean, getElements, getLocale, getLocale, getProperty, getProperty, getRequest, getSession, setApplicationContext
-
Field Details
-
ERROR_MESSAGE_LAUNCHING_UNAUTHORIZED_MAINTAIN
- See Also:
-
-
Constructor Details
-
MaintainService
public MaintainService(MaintainLauncher maintainLauncher, QueryUtil queryUtil, DatabaseConfigProperties databaseConfigProperties) Autowired constructor- Parameters:
maintainLauncher
- Maintain launcherqueryUtil
- Query utilitiesdatabaseConfigProperties
- Database configuration properties
-
-
Method Details
-
launchMaintainAction
Launch maintain action (from services)- Returns:
- Service data
- Throws:
AWException
- AWE exception
-
getMaintainList
Retrieve maintain list- Parameters:
search
- Search text- Returns:
- Maintain list
-
launchMaintain
Launches a maintain- Parameters:
maintainId
- Maintain identifier- Returns:
- Service output
- Throws:
AWException
- Error launching maintain
-
launchMaintain
Launches a maintain with an alias- Parameters:
maintainId
- Maintain identifieralias
- Connection alias- Returns:
- Service output
- Throws:
AWException
- Error launching maintain
-
launchMaintain
public ServiceData launchMaintain(String maintainId, com.fasterxml.jackson.databind.node.ObjectNode parameters) throws AWException Launches one maintain with parameters- Parameters:
maintainId
- Maintain identifierparameters
- Launch parameters- Returns:
- Service output
- Throws:
AWException
- Error launching maintain
-
launchMaintain
public ServiceData launchMaintain(String maintainId, DatabaseConnection databaseConnection, boolean keepAliveConnection) throws AWException Launches one maintain with a connection- Parameters:
maintainId
- Maintain identifierdatabaseConnection
- Database connectionkeepAliveConnection
- Keep alive connection (for treatments)- Returns:
- Service output
- Throws:
AWException
- Error launching maintain
-
launchMaintain
public ServiceData launchMaintain(String maintainId, com.fasterxml.jackson.databind.node.ObjectNode parameters, DatabaseConnection databaseConnection, boolean keepAliveConnection) throws AWException Launches one maintain with a connection- Parameters:
maintainId
- Maintain identifierdatabaseConnection
- Database connectionkeepAliveConnection
- Keep alive connection (for treatments)- Returns:
- Service output
- Throws:
AWException
- Error launching maintain
-
launchPrivateMaintain
Launches a maintain- Parameters:
maintainId
- Maintain identifier- Returns:
- Service output
- Throws:
AWException
- Error launching maintain
-
launchPrivateMaintain
Launches a maintain with an alias- Parameters:
maintainId
- Maintain identifieralias
- Connection alias- Returns:
- Service output
- Throws:
AWException
- Error launching maintain
-
launchPrivateMaintain
public ServiceData launchPrivateMaintain(String maintainId, com.fasterxml.jackson.databind.node.ObjectNode parameters) throws AWException Launches one maintain with parameters- Parameters:
maintainId
- Maintain identifierparameters
- Launch parameters- Returns:
- Service output
- Throws:
AWException
- Error launching maintain
-
launchPrivateMaintain
public ServiceData launchPrivateMaintain(String maintainId, DatabaseConnection databaseConnection, boolean keepAliveConnection) throws AWException Launches one maintain with a connection without checking session- Parameters:
maintainId
- Maintain identifierdatabaseConnection
- Database connectionkeepAliveConnection
- Keep alive connection (for treatments)- Returns:
- Service output
- Throws:
AWException
- Error launching maintain
-
launchPrivateMaintain
public ServiceData launchPrivateMaintain(String maintainId, com.fasterxml.jackson.databind.node.ObjectNode parameters, DatabaseConnection databaseConnection, boolean keepAliveConnection) throws AWException Launches one maintain with a connection without checking session- Parameters:
maintainId
- Maintain identifierparameters
- ParametersdatabaseConnection
- Database connectionkeepAliveConnection
- Keep alive connection (for treatments)- Returns:
- Service output
- Throws:
AWException
- Error launching maintain
-
getDatabaseConnection
public DatabaseConnection getDatabaseConnection(com.fasterxml.jackson.databind.node.ObjectNode parameters) throws AWException Retrieve database connection from parameters- Parameters:
parameters
- Parameters- Returns:
- Database connection
- Throws:
AWException
- Error retrieving database connection
-
getDatabaseConnection
Retrieve database connection- Returns:
- Database connection
- Throws:
AWException
- Error retrieving database connection
-
getDatabaseConnection
Get database connection- Parameters:
alias
- Alias- Returns:
- Database connection
- Throws:
AWException
- AWE exception
-
getDatabaseConnection
Get database connection- Parameters:
dataSource
- Datasource- Returns:
- Database connection
- Throws:
AWException
- AWE exception
-
launchMaintain
public ServiceData launchMaintain(Target maintainTarget, com.fasterxml.jackson.databind.node.ObjectNode parameters, DatabaseConnection databaseConnection, boolean keepAliveConnection) throws AWException Launches a maintain- Parameters:
maintainTarget
- Maintain targetdatabaseConnection
- Database connectionkeepAliveConnection
- Keep alive connection (for treatments)- Returns:
- Service output
- Throws:
AWException
- Error launching maintain
-
getNextSequenceValue
Retrieve next sequence value (and increase sequence)- Parameters:
sequence
- Sequence identifier- Returns:
- Sequence value
- Throws:
AWException
- Error retrieving next sequence value
-
getNextSequenceValue
Retrieve next sequence value (and increase sequence)- Parameters:
sequence
- Sequence identifierdatabaseAlias
- Database alias- Returns:
- Sequence value
- Throws:
AWException
- Error retrieving next sequence value
-
getNextSequenceValue
public Integer getNextSequenceValue(String sequence, DatabaseConnection databaseConnection) throws AWException Retrieve next sequence value (and increase sequence)- Parameters:
sequence
- Sequence identifierdatabaseConnection
- Database alias- Returns:
- Sequence value
- Throws:
AWException
- Error retrieving next sequence value
-
doRollback
public void doRollback(DatabaseConnection databaseConnection, String statementList, boolean manageConnection) throws AWException Do maintain rollback- Parameters:
databaseConnection
- Database connectionstatementList
- Statement listmanageConnection
- Manage connection- Throws:
AWException
- Error doing rollback
-
doCommit
public void doCommit(DatabaseConnection databaseConnection, String statementList, boolean manageConnection) throws AWException Do maintain rollback- Parameters:
databaseConnection
- Database connectionstatementList
- Statement listmanageConnection
- Manage connection- Throws:
AWException
- Error doing rollback
-