
public class DbRule extends AbstractDbDataDao<Rule>
| Modifier and Type | Class and Description | 
|---|---|
| static class  | DbRule.Columns | 
AbstractDbData.UpdatedInfo| Modifier and Type | Field and Description | 
|---|---|
| static int[] | dbTypes | 
| static DbRule.Columns[] | indexes | 
| protected static String | selectAllFields | 
| static String | table | 
| static String | TASK_COMMENTInternal context XML fields | 
| static String | TASK_DELAYInternal context XML fields | 
| static String | TASK_PATHInternal context XML fields | 
| static String | TASK_RANKInternal context XML fields | 
| static String | TASK_TYPEInternal context XML fields | 
JSON_MODEL, pojo, SHOULD_NOT_BE_CALLEDallFields, dbSession, isSaved, otherFields, primaryKey| Constructor and Description | 
|---|
| DbRule(com.fasterxml.jackson.databind.node.ObjectNode source)Constructor from Json | 
| DbRule(Rule rule) | 
| DbRule(String idRule) | 
| DbRule(String idrule,
      String[] idsArrayRef,
      int mode,
      String recvpath,
      String sendpath,
      String archivepath,
      String workpath,
      String[][] rpretasksArray,
      String[][] rposttasksArray,
      String[][] rerrortasksArray,
      String[][] spretasksArray,
      String[][] sposttasksArray,
      String[][] serrortasksArray)Constructor used from XML file | 
| DbRule(String idRule,
      String ids,
      int mode,
      String recvPath,
      String sendPath,
      String archivePath,
      String workPath,
      String rpreTasks,
      String rpostTasks,
      String rerrorTasks,
      String spreTasks,
      String spostTasks,
      String serrorTasks) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | changeUpdatedInfo(AbstractDbData.UpdatedInfo info)Change UpdatedInfo status | 
| boolean | checkHostAllow(String hostId)Check if the given hostTo is in the allowed list | 
| protected void | checkPathes() | 
| protected void | checkValues() | 
| void | delete()Delete object from table DbRule only if no DbTaskRunner is using it. | 
| static DbRule[] | deleteAll()Delete all Rules but returns original one, therefore not checking if
 any TaskRunner are using it (used by reloading rules) | 
| static DbRule[] | getAllRules()Get All DbRule from database or from internal hashMap in case of no
 database support | 
| String | getArchivePath() | 
| protected AbstractDAO<Rule> | getDao(boolean isCacheable) | 
| static DbPreparedStatement | getFilterPrepareStament(DbSession session,
                       String rule,
                       int mode) | 
| static DbRule | getFromStatement(DbPreparedStatement preparedStatement)For instance from Commander when getting updated information | 
| String | getIdRule() | 
| String[] | getIdsArray() | 
| static String | getJson(DbPreparedStatement preparedStatement,
       int limit)Write selected DbRule to a Json String | 
| String | getJsonAsString() | 
| int | getMode() | 
| protected String | getPrimaryField() | 
| protected String | getPrimaryKey() | 
| String | getRecvPath() | 
| String[][] | getRerrorTasksArray() | 
| String[][] | getRpostTasksArray() | 
| String[][] | getRpreTasksArray() | 
| String | getRuleArchivePath() | 
| String | getRuleRecvPath() | 
| String | getRuleSendPath() | 
| String | getRuleWorkPath() | 
| String | getSendPath() | 
| String[][] | getSerrorTasksArray() | 
| String[][] | getSpostTasksArray() | 
| String[][] | getSpreTasksArray() | 
| protected String | getTable() | 
| static DbRule[] | getUpdatedPrepareStament() | 
| String | getWorkPath() | 
| protected void | initObject()To setup primaryKey, otherFields, allFields. | 
| boolean | isRecvMode() | 
| boolean | isSendMode() | 
| String | printTasks(boolean isSender,
          DbTaskRunner.TASKSTEP step) | 
| String | setArchivePath(String filename)Get the full path from archivePath | 
| void | setFromJson(com.fasterxml.jackson.databind.node.ObjectNode node,
           boolean ignorePrimaryKey)Set the values from the Json node to the current object (no database
 access) | 
| protected void | setFromJson(String field,
           com.fasterxml.jackson.databind.JsonNode value) | 
| String | setRecvPath(String filename)Get the full path from RecvPath (used only in copy MODETRANS) | 
| String | setSendPath(String filename)Get the full path from sendPath | 
| String | setWorkingPath(String filename)Get the full path from workPath | 
| String | toShortString()Object to String | 
| String | toSpecializedHtml(R66Session session,
                 String body) | 
| String | toString()Object to String | 
asJson, exist, getInsertAllValues, getJson, getSelectAllFields, getUpdateAllFields, getValues, getWherePrimaryKey, insert, select, setFromArray, setPrimaryKey, setToArray, toJson, update, validateLength, validateLengthgetAllFields, getTrueValue, setTrueValue, setValuespublic static final int[] dbTypes
public static final String table
public static final DbRule.Columns[] indexes
public static final String TASK_TYPE
public static final String TASK_PATH
public static final String TASK_DELAY
public static final String TASK_RANK
public static final String TASK_COMMENT
protected static final String selectAllFields
public DbRule(String idRule, String ids, int mode, String recvPath, String sendPath, String archivePath, String workPath, String rpreTasks, String rpostTasks, String rerrorTasks, String spreTasks, String spostTasks, String serrorTasks) throws WaarpDatabaseSqlException
idRule - ids - mode - recvPath - sendPath - archivePath - workPath - rpreTasks - rpostTasks - rerrorTasks - spreTasks - spostTasks - serrorTasks - WaarpDatabaseSqlExceptionpublic DbRule(String idRule) throws WaarpDatabaseException
idRule - WaarpDatabaseExceptionpublic DbRule(Rule rule)
public DbRule(String idrule, String[] idsArrayRef, int mode, String recvpath, String sendpath, String archivepath, String workpath, String[][] rpretasksArray, String[][] rposttasksArray, String[][] rerrortasksArray, String[][] spretasksArray, String[][] sposttasksArray, String[][] serrortasksArray) throws WaarpDatabaseSqlException
idrule - idsArrayRef - recvpath - sendpath - archivepath - workpath - rpretasksArray - rposttasksArray - rerrortasksArray - spretasksArray - sposttasksArray - serrortasksArray - WaarpDatabaseSqlExceptionpublic DbRule(com.fasterxml.jackson.databind.node.ObjectNode source)
       throws WaarpDatabaseSqlException
source - WaarpDatabaseSqlExceptionprotected final void initObject()
AbstractDbDatainitObject in class AbstractDbDataDao<Rule>protected final String getTable()
getTable in class AbstractDbDataDao<Rule>protected final AbstractDAO<Rule> getDao(boolean isCacheable) throws DAOConnectionException
getDao in class AbstractDbDataDao<Rule>DAOConnectionExceptionprotected final String getPrimaryKey()
getPrimaryKey in class AbstractDbDataDao<Rule>protected final String getPrimaryField()
getPrimaryField in class AbstractDbDataDao<Rule>protected final void checkPathes()
                          throws WaarpDatabaseSqlException
WaarpDatabaseSqlExceptionprotected final void checkValues()
                          throws WaarpDatabaseSqlException
checkValues in class AbstractDbDataDao<Rule>WaarpDatabaseSqlExceptionpublic final void setFromJson(com.fasterxml.jackson.databind.node.ObjectNode node,
                              boolean ignorePrimaryKey)
                       throws WaarpDatabaseSqlException
AbstractDbDataDaosetFromJson in class AbstractDbDataDao<Rule>ignorePrimaryKey - True will ignore primaryKey from JsonWaarpDatabaseSqlExceptionprotected final void setFromJson(String field, com.fasterxml.jackson.databind.JsonNode value) throws WaarpDatabaseSqlException
setFromJson in class AbstractDbDataDao<Rule>WaarpDatabaseSqlExceptionpublic final void delete()
                  throws WaarpDatabaseException
delete in class AbstractDbDataDao<Rule>WaarpDatabaseExceptionpublic static DbRule[] deleteAll() throws WaarpDatabaseException
WaarpDatabaseExceptionpublic static DbRule[] getAllRules() throws WaarpDatabaseNoConnectionException
WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static DbRule getFromStatement(DbPreparedStatement preparedStatement) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
preparedStatement - WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static DbRule[] getUpdatedPrepareStament() throws WaarpDatabaseNoConnectionException
WaarpDatabaseNoConnectionExceptionpublic final void changeUpdatedInfo(AbstractDbData.UpdatedInfo info)
AbstractDbDataDaochangeUpdatedInfo in class AbstractDbDataDao<Rule>public final String setRecvPath(String filename)
filename - public final String setSendPath(String filename)
filename - public final String setArchivePath(String filename)
filename - public final String setWorkingPath(String filename)
filename - public final boolean checkHostAllow(String hostId)
hostId - public final boolean isSendMode()
public final boolean isRecvMode()
public final String toString()
toString in class ObjectObject.toString()public final String printTasks(boolean isSender, DbTaskRunner.TASKSTEP step)
isSender - step - public final String toShortString()
Object.toString()public static DbPreparedStatement getFilterPrepareStament(DbSession session, String rule, int mode) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
session - rule - mode - WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic static String getJson(DbPreparedStatement preparedStatement, int limit) throws WaarpDatabaseNoConnectionException, WaarpDatabaseSqlException
preparedStatement - WaarpDatabaseNoConnectionExceptionWaarpDatabaseSqlExceptionpublic final String getJsonAsString()
public final String toSpecializedHtml(R66Session session, String body)
session - body - public final String getRecvPath()
public final String getSendPath()
public final String getArchivePath()
public final String getWorkPath()
public final String getRuleRecvPath()
public final String getRuleSendPath()
public final String getRuleArchivePath()
public final String getRuleWorkPath()
public final String getIdRule()
public final int getMode()
public final String[] getIdsArray()
public final String[][] getRpreTasksArray()
public final String[][] getRpostTasksArray()
public final String[][] getRerrorTasksArray()
public final String[][] getSpreTasksArray()
public final String[][] getSpostTasksArray()
public final String[][] getSerrorTasksArray()
Copyright © 2009–2022 Waarp. All rights reserved.