public class BlockFilterDefault extends Object implements IBlockFilter
| Modifier and Type | Field and Description |
|---|---|
protected List<String> |
disabledAliases
List of disabled aliases.
|
protected List<? extends ActionType> |
disabledTypes
List of disabled types.
|
protected List<String> |
enabledAliases
List of enabled aliases.
|
protected List<? extends ActionType> |
enabledTypes
List of enabled types.
|
static String |
FEATURE_DISABLED_ALIASES
Feature to set the disabled aliases using IFeatureManager or
IConfiguration.
|
static String |
FEATURE_DISABLED_TYPES
Feature to set the disabled type using IFeatureManager or IConfiguration.
|
static String |
FEATURE_ENABLED_ALIASES
Feature to set the enabled aliases using IFeatureManager or
IConfiguration.
|
static String |
FEATURE_ENABLED_TYPES
Feature to set the enabled types using IFeatureManager or IConfiguration.
|
static ThreadLocal<BlockFilterDefault> |
INSTANCE
Thread safe filter instance.
|
protected boolean |
showMessage
Show message on error.
|
| Constructor and Description |
|---|
BlockFilterDefault() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(IBlock block)
Check if a given block is accepted.
|
List<String> |
getDisabledAliases()
Get the list of disabled aliases.
|
List<? extends ActionType> |
getDisabledTypes()
Get the list of disabled types.
|
List<String> |
getEnabledAliases()
Get the list of enabled aliases.
|
List<? extends ActionType> |
getEnabledTypes()
Get the list of enabled types.
|
void |
initialize(IContext context)
Inicialize filter.
|
boolean |
isShowMessage()
Indicate runner to show message on not accepted blocks.
|
void |
setDisabledAliases(List<String> disabledAliases)
List of alias that should be ignored by runner.
|
void |
setDisabledTypes(List<? extends ActionType> disabledTypes)
List of action types that should be ignored by runner.
|
void |
setEnabledAliases(List<String> enabledAliases)
List of alias that should be enabled by runner.
|
void |
setEnabledTypes(List<? extends ActionType> enabledTypes)
List of action types that should be enabled by runner.
|
void |
setShowMessage(boolean showMessage)
Set the message status.
|
boolean |
showMessage(IBlock block)
Indicates to show message if not accepted.
|
public static final String FEATURE_DISABLED_ALIASES
public static final String FEATURE_ENABLED_ALIASES
public static final String FEATURE_DISABLED_TYPES
public static final String FEATURE_ENABLED_TYPES
public static final ThreadLocal<BlockFilterDefault> INSTANCE
protected List<? extends ActionType> disabledTypes
protected List<? extends ActionType> enabledTypes
protected boolean showMessage
public void setDisabledAliases(List<String> disabledAliases)
disabledAliases - The alias to be ignored by runner.public List<String> getDisabledAliases()
public void setEnabledAliases(List<String> enabledAliases)
enabledAliases - The alias to be enabled by runner.public List<String> getEnabledAliases()
public void setDisabledTypes(List<? extends ActionType> disabledTypes)
disabledTypes - The types to be ignored by runner.public List<? extends ActionType> getDisabledTypes()
public void setEnabledTypes(List<? extends ActionType> enabledTypes)
enabledTypes - The types to be enabled by runner.public List<? extends ActionType> getEnabledTypes()
public boolean isShowMessage()
true, to show message, false,
otherwise.public void setShowMessage(boolean showMessage)
showMessage - The message flag.public void initialize(IContext context)
IBlockFilterinitialize in interface IBlockFiltercontext - The context.public boolean accept(IBlock block)
IBlockFilteraccept in interface IBlockFilterblock - The block to test.true, if block is accepted, false,
otherwise.public boolean showMessage(IBlock block)
IBlockFiltershowMessage in interface IBlockFilterblock - The block.true, if block must show message, false
, otherwise.Copyright © 2016. All rights reserved.