Class WallConfig

java.lang.Object
com.alibaba.druid.wall.WallConfig
All Implemented Interfaces:
WallConfigMBean

public class WallConfig extends Object implements WallConfigMBean
  • Field Details

    • denyFunctions

      protected final Set<String> denyFunctions
    • denyTables

      protected final Set<String> denyTables
    • denySchemas

      protected final Set<String> denySchemas
    • denyVariants

      protected final Set<String> denyVariants
    • denyObjects

      protected final Set<String> denyObjects
    • permitFunctions

      protected final Set<String> permitFunctions
    • permitTables

      protected final Set<String> permitTables
    • permitSchemas

      protected final Set<String> permitSchemas
    • permitVariants

      protected final Set<String> permitVariants
    • readOnlyTables

      protected final Set<String> readOnlyTables
    • updateCheckColumns

      protected Map<String,Set<String>> updateCheckColumns
    • updateCheckHandler

      protected WallUpdateCheckHandler updateCheckHandler
  • Constructor Details

    • WallConfig

      public WallConfig()
    • WallConfig

      public WallConfig(String dir)
  • Method Details

    • isCaseConditionConstAllow

      public boolean isCaseConditionConstAllow()
    • setCaseConditionConstAllow

      public void setCaseConditionConstAllow(boolean caseConditionConstAllow)
    • isConditionDoubleConstAllow

      public boolean isConditionDoubleConstAllow()
    • setConditionDoubleConstAllow

      public void setConditionDoubleConstAllow(boolean conditionDoubleConstAllow)
    • isConditionLikeTrueAllow

      public boolean isConditionLikeTrueAllow()
    • setConditionLikeTrueAllow

      public void setConditionLikeTrueAllow(boolean conditionLikeTrueAllow)
    • isLimitZeroAllow

      public boolean isLimitZeroAllow()
    • setLimitZeroAllow

      public void setLimitZeroAllow(boolean limitZero)
    • isUseAllow

      public boolean isUseAllow()
    • setUseAllow

      public void setUseAllow(boolean useAllow)
    • isCommitAllow

      public boolean isCommitAllow()
    • setCommitAllow

      public void setCommitAllow(boolean commitAllow)
    • isRollbackAllow

      public boolean isRollbackAllow()
    • setRollbackAllow

      public void setRollbackAllow(boolean rollbackAllow)
    • isIntersectAllow

      public boolean isIntersectAllow()
    • setIntersectAllow

      public void setIntersectAllow(boolean intersectAllow)
    • isMinusAllow

      public boolean isMinusAllow()
    • setMinusAllow

      public void setMinusAllow(boolean minusAllow)
    • isConditionOpXorAllow

      public boolean isConditionOpXorAllow()
    • setConditionOpXorAllow

      public void setConditionOpXorAllow(boolean conditionOpXorAllow)
    • getTenantTablePattern

      public String getTenantTablePattern()
    • setTenantTablePattern

      public void setTenantTablePattern(String tenantTablePattern)
    • getTenantColumn

      public String getTenantColumn()
    • setTenantColumn

      public void setTenantColumn(String tenantColumn)
    • getTenantCallBack

      public WallConfig.TenantCallBack getTenantCallBack()
    • setTenantCallBack

      public void setTenantCallBack(WallConfig.TenantCallBack tenantCallBack)
    • isMetadataAllow

      public boolean isMetadataAllow()
    • setMetadataAllow

      public void setMetadataAllow(boolean metadataAllow)
    • isWrapAllow

      public boolean isWrapAllow()
    • setWrapAllow

      public void setWrapAllow(boolean wrapAllow)
    • isDoPrivilegedAllow

      public boolean isDoPrivilegedAllow()
    • setDoPrivilegedAllow

      public void setDoPrivilegedAllow(boolean doPrivilegedAllow)
    • isSelectAllColumnAllow

      public boolean isSelectAllColumnAllow()
    • setSelectAllColumnAllow

      public void setSelectAllColumnAllow(boolean selectAllColumnAllow)
    • isInited

      public boolean isInited()
      Specified by:
      isInited in interface WallConfigMBean
    • getDir

      public String getDir()
      Specified by:
      getDir in interface WallConfigMBean
    • setDir

      public void setDir(String dir)
      Specified by:
      setDir in interface WallConfigMBean
    • init

      public final void init()
      Specified by:
      init in interface WallConfigMBean
    • loadConfig

      public void loadConfig(String dir)
      Specified by:
      loadConfig in interface WallConfigMBean
    • isNoneBaseStatementAllow

      public boolean isNoneBaseStatementAllow()
      Specified by:
      isNoneBaseStatementAllow in interface WallConfigMBean
    • setNoneBaseStatementAllow

      public void setNoneBaseStatementAllow(boolean noneBaseStatementAllow)
      Specified by:
      setNoneBaseStatementAllow in interface WallConfigMBean
    • isDescribeAllow

      public boolean isDescribeAllow()
      allow mysql describe statement
      Returns:
      Since:
      0.2.10
    • setDescribeAllow

      public void setDescribeAllow(boolean describeAllow)
      set allow mysql describe statement
      Since:
      0.2.10
    • isShowAllow

      public boolean isShowAllow()
    • setShowAllow

      public void setShowAllow(boolean showAllow)
    • isTruncateAllow

      public boolean isTruncateAllow()
      Specified by:
      isTruncateAllow in interface WallConfigMBean
    • setTruncateAllow

      public void setTruncateAllow(boolean truncateAllow)
      Specified by:
      setTruncateAllow in interface WallConfigMBean
    • isSelectIntoAllow

      public boolean isSelectIntoAllow()
      Specified by:
      isSelectIntoAllow in interface WallConfigMBean
    • setSelectIntoAllow

      public void setSelectIntoAllow(boolean selectIntoAllow)
      Specified by:
      setSelectIntoAllow in interface WallConfigMBean
    • isSelectIntoOutfileAllow

      public boolean isSelectIntoOutfileAllow()
      Specified by:
      isSelectIntoOutfileAllow in interface WallConfigMBean
    • setSelectIntoOutfileAllow

      public void setSelectIntoOutfileAllow(boolean selectIntoOutfileAllow)
      Specified by:
      setSelectIntoOutfileAllow in interface WallConfigMBean
    • isCreateTableAllow

      public boolean isCreateTableAllow()
    • setCreateTableAllow

      public void setCreateTableAllow(boolean createTableAllow)
    • isDropTableAllow

      public boolean isDropTableAllow()
    • setDropTableAllow

      public void setDropTableAllow(boolean dropTableAllow)
    • isAlterTableAllow

      public boolean isAlterTableAllow()
    • setAlterTableAllow

      public void setAlterTableAllow(boolean alterTableAllow)
    • isRenameTableAllow

      public boolean isRenameTableAllow()
    • setRenameTableAllow

      public void setRenameTableAllow(boolean renameTableAllow)
    • isSelectUnionCheck

      public boolean isSelectUnionCheck()
      Specified by:
      isSelectUnionCheck in interface WallConfigMBean
    • setSelectUnionCheck

      public void setSelectUnionCheck(boolean selectUnionCheck)
      Specified by:
      setSelectUnionCheck in interface WallConfigMBean
    • isSelectMinusCheck

      public boolean isSelectMinusCheck()
    • setSelectMinusCheck

      public void setSelectMinusCheck(boolean selectMinusCheck)
    • isSelectExceptCheck

      public boolean isSelectExceptCheck()
    • setSelectExceptCheck

      public void setSelectExceptCheck(boolean selectExceptCheck)
    • isSelectIntersectCheck

      public boolean isSelectIntersectCheck()
    • setSelectIntersectCheck

      public void setSelectIntersectCheck(boolean selectIntersectCheck)
    • isDeleteAllow

      public boolean isDeleteAllow()
      Specified by:
      isDeleteAllow in interface WallConfigMBean
    • setDeleteAllow

      public void setDeleteAllow(boolean deleteAllow)
      Specified by:
      setDeleteAllow in interface WallConfigMBean
    • isDeleteWhereNoneCheck

      public boolean isDeleteWhereNoneCheck()
    • setDeleteWhereNoneCheck

      public void setDeleteWhereNoneCheck(boolean deleteWhereNoneCheck)
    • isUpdateAllow

      public boolean isUpdateAllow()
      Specified by:
      isUpdateAllow in interface WallConfigMBean
    • setUpdateAllow

      public void setUpdateAllow(boolean updateAllow)
      Specified by:
      setUpdateAllow in interface WallConfigMBean
    • isUpdateWhereNoneCheck

      public boolean isUpdateWhereNoneCheck()
    • setUpdateWhereNoneCheck

      public void setUpdateWhereNoneCheck(boolean updateWhereNoneCheck)
    • isInsertAllow

      public boolean isInsertAllow()
      Specified by:
      isInsertAllow in interface WallConfigMBean
    • setInsertAllow

      public void setInsertAllow(boolean insertAllow)
      Specified by:
      setInsertAllow in interface WallConfigMBean
    • isReplaceAllow

      public boolean isReplaceAllow()
    • setReplaceAllow

      public void setReplaceAllow(boolean replaceAllow)
    • isSetAllow

      public boolean isSetAllow()
    • setSetAllow

      public void setSetAllow(boolean value)
    • isMergeAllow

      public boolean isMergeAllow()
      Specified by:
      isMergeAllow in interface WallConfigMBean
    • setMergeAllow

      public void setMergeAllow(boolean mergeAllow)
      Specified by:
      setMergeAllow in interface WallConfigMBean
    • isMultiStatementAllow

      public boolean isMultiStatementAllow()
      Specified by:
      isMultiStatementAllow in interface WallConfigMBean
    • setMultiStatementAllow

      public void setMultiStatementAllow(boolean multiStatementAllow)
      Specified by:
      setMultiStatementAllow in interface WallConfigMBean
    • isSchemaCheck

      public boolean isSchemaCheck()
      Specified by:
      isSchemaCheck in interface WallConfigMBean
    • setSchemaCheck

      public void setSchemaCheck(boolean schemaCheck)
      Specified by:
      setSchemaCheck in interface WallConfigMBean
    • isTableCheck

      public boolean isTableCheck()
      Specified by:
      isTableCheck in interface WallConfigMBean
    • setTableCheck

      public void setTableCheck(boolean tableCheck)
      Specified by:
      setTableCheck in interface WallConfigMBean
    • isFunctionCheck

      public boolean isFunctionCheck()
      Specified by:
      isFunctionCheck in interface WallConfigMBean
    • setFunctionCheck

      public void setFunctionCheck(boolean functionCheck)
      Specified by:
      setFunctionCheck in interface WallConfigMBean
    • isVariantCheck

      public boolean isVariantCheck()
      Specified by:
      isVariantCheck in interface WallConfigMBean
    • setVariantCheck

      public void setVariantCheck(boolean variantCheck)
      Specified by:
      setVariantCheck in interface WallConfigMBean
    • isObjectCheck

      public boolean isObjectCheck()
      Specified by:
      isObjectCheck in interface WallConfigMBean
    • setObjectCheck

      public void setObjectCheck(boolean objectCheck)
      Specified by:
      setObjectCheck in interface WallConfigMBean
    • isCommentAllow

      public boolean isCommentAllow()
      Specified by:
      isCommentAllow in interface WallConfigMBean
    • setCommentAllow

      public void setCommentAllow(boolean commentAllow)
      Specified by:
      setCommentAllow in interface WallConfigMBean
    • isStrictSyntaxCheck

      public boolean isStrictSyntaxCheck()
    • setStrictSyntaxCheck

      public void setStrictSyntaxCheck(boolean strictSyntaxCheck)
    • isConstArithmeticAllow

      public boolean isConstArithmeticAllow()
    • setConstArithmeticAllow

      public void setConstArithmeticAllow(boolean constArithmeticAllow)
    • getDenyFunctions

      public Set<String> getDenyFunctions()
      Specified by:
      getDenyFunctions in interface WallConfigMBean
    • getDenyTables

      public Set<String> getDenyTables()
      Specified by:
      getDenyTables in interface WallConfigMBean
    • getDenySchemas

      public Set<String> getDenySchemas()
      Specified by:
      getDenySchemas in interface WallConfigMBean
    • getDenyVariants

      public Set<String> getDenyVariants()
      Specified by:
      getDenyVariants in interface WallConfigMBean
    • getDenyObjects

      public Set<String> getDenyObjects()
      Specified by:
      getDenyObjects in interface WallConfigMBean
    • getReadOnlyTables

      public Set<String> getReadOnlyTables()
      Specified by:
      getReadOnlyTables in interface WallConfigMBean
    • addReadOnlyTable

      public void addReadOnlyTable(String tableName)
    • isReadOnly

      public boolean isReadOnly(String tableName)
    • getPermitFunctions

      public Set<String> getPermitFunctions()
    • getPermitTables

      public Set<String> getPermitTables()
    • getPermitSchemas

      public Set<String> getPermitSchemas()
    • getPermitVariants

      public Set<String> getPermitVariants()
    • isMustParameterized

      public boolean isMustParameterized()
    • setMustParameterized

      public void setMustParameterized(boolean mustParameterized)
    • isDenyObjects

      public boolean isDenyObjects(String name)
      Specified by:
      isDenyObjects in interface WallConfigMBean
    • isDenySchema

      public boolean isDenySchema(String name)
      Specified by:
      isDenySchema in interface WallConfigMBean
    • isDenyFunction

      public boolean isDenyFunction(String name)
      Specified by:
      isDenyFunction in interface WallConfigMBean
    • isCallAllow

      public boolean isCallAllow()
    • setCallAllow

      public void setCallAllow(boolean callAllow)
    • isHintAllow

      public boolean isHintAllow()
    • setHintAllow

      public void setHintAllow(boolean hintAllow)
    • isSelectAllow

      public boolean isSelectAllow()
    • setSelectAllow

      public void setSelectAllow(boolean selelctAllow)
    • isSelelctAllow

      public boolean isSelelctAllow()
      Deprecated.
      use isSelectAllow
      Specified by:
      isSelelctAllow in interface WallConfigMBean
    • setSelelctAllow

      public void setSelelctAllow(boolean selelctAllow)
      Deprecated.
      use setSelelctAllow
      Specified by:
      setSelelctAllow in interface WallConfigMBean
    • isSelectWhereAlwayTrueCheck

      public boolean isSelectWhereAlwayTrueCheck()
      Specified by:
      isSelectWhereAlwayTrueCheck in interface WallConfigMBean
    • setSelectWhereAlwayTrueCheck

      public void setSelectWhereAlwayTrueCheck(boolean selectWhereAlwayTrueCheck)
      Specified by:
      setSelectWhereAlwayTrueCheck in interface WallConfigMBean
    • isSelectHavingAlwayTrueCheck

      public boolean isSelectHavingAlwayTrueCheck()
      Specified by:
      isSelectHavingAlwayTrueCheck in interface WallConfigMBean
    • setSelectHavingAlwayTrueCheck

      public void setSelectHavingAlwayTrueCheck(boolean selectHavingAlwayTrueCheck)
      Specified by:
      setSelectHavingAlwayTrueCheck in interface WallConfigMBean
    • isConditionAndAlwayTrueAllow

      public boolean isConditionAndAlwayTrueAllow()
    • setConditionAndAlwayTrueAllow

      public void setConditionAndAlwayTrueAllow(boolean conditionAndAlwayTrueAllow)
    • isConditionAndAlwayFalseAllow

      public boolean isConditionAndAlwayFalseAllow()
    • setConditionAndAlwayFalseAllow

      public void setConditionAndAlwayFalseAllow(boolean conditionAndAlwayFalseAllow)
    • isDeleteWhereAlwayTrueCheck

      public boolean isDeleteWhereAlwayTrueCheck()
      Specified by:
      isDeleteWhereAlwayTrueCheck in interface WallConfigMBean
    • setDeleteWhereAlwayTrueCheck

      public void setDeleteWhereAlwayTrueCheck(boolean deleteWhereAlwayTrueCheck)
      Specified by:
      setDeleteWhereAlwayTrueCheck in interface WallConfigMBean
    • isUpdateWhereAlayTrueCheck

      public boolean isUpdateWhereAlayTrueCheck()
      Specified by:
      isUpdateWhereAlayTrueCheck in interface WallConfigMBean
    • setUpdateWhereAlayTrueCheck

      public void setUpdateWhereAlayTrueCheck(boolean updateWhereAlayTrueCheck)
      Specified by:
      setUpdateWhereAlayTrueCheck in interface WallConfigMBean
    • isConditionOpBitwseAllow

      public boolean isConditionOpBitwseAllow()
    • setConditionOpBitwseAllow

      public void setConditionOpBitwseAllow(boolean conditionOpBitwseAllow)
    • setInited

      public void setInited(boolean inited)
    • isLockTableAllow

      public boolean isLockTableAllow()
    • setLockTableAllow

      public void setLockTableAllow(boolean lockTableAllow)
    • isStartTransactionAllow

      public boolean isStartTransactionAllow()
    • setStartTransactionAllow

      public void setStartTransactionAllow(boolean startTransactionAllow)
    • isCompleteInsertValuesCheck

      public boolean isCompleteInsertValuesCheck()
    • setCompleteInsertValuesCheck

      public void setCompleteInsertValuesCheck(boolean completeInsertValuesCheck)
    • getInsertValuesCheckSize

      public int getInsertValuesCheckSize()
    • setInsertValuesCheckSize

      public void setInsertValuesCheckSize(int insertValuesCheckSize)
    • isBlockAllow

      public boolean isBlockAllow()
    • setBlockAllow

      public void setBlockAllow(boolean blockAllow)
    • getSelectLimit

      public int getSelectLimit()
    • setSelectLimit

      public void setSelectLimit(int selectLimit)
    • configFromProperties

      public void configFromProperties(Properties properties)
    • addUpdateCheckCoumns

      public void addUpdateCheckCoumns(String columnInfo)
    • isUpdateCheckTable

      public boolean isUpdateCheckTable(String tableName)
    • getUpdateCheckTable

      public Set<String> getUpdateCheckTable(String tableName)
    • getUpdateCheckHandler

      public WallUpdateCheckHandler getUpdateCheckHandler()
    • setUpdateCheckHandler

      public void setUpdateCheckHandler(WallUpdateCheckHandler updateCheckHandler)