public class Searchable
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
allowDynamicIndexing |
static boolean |
DYNAMIC_INDEXING_DEFAULT
Default for allowing dynamic indexing
|
private boolean |
frozen |
private boolean |
keys |
static boolean |
KEYS_DEFAULT
Default for auto-searchable keys
|
private java.util.Map<java.lang.String,SearchAttribute> |
searchAttributes
The defined search attributes (if any) indexed by name
|
private boolean |
values |
static boolean |
VALUES_DEFAULT
Default for auto-searchable values
|
Constructor and Description |
---|
Searchable()
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addSearchAttribute(SearchAttribute searchAttribute)
Add the given search attribute
|
void |
allowDynamicIndexing(boolean allow)
Allow or disallow dynamic search attribute extraction
|
private void |
checkDynamicChange() |
private void |
disallowBuiltins(java.lang.String attributeName) |
void |
freezeConfiguration()
Freeze this configuration.
|
java.util.Map<java.lang.String,SearchAttribute> |
getSearchAttributes()
Get the defined search attributes indexed by attribute name
|
java.util.Map<java.lang.String,SearchAttribute> |
getUserDefinedSearchAttributes()
Get the defined search attributes indexed by attribute name *excluding* any search attributes that are automatically/implicitly
defined (eg.
|
boolean |
isDynamicIndexingAllowed()
Is dynamic indexing allowed?
|
boolean |
keys()
Are keys searchable?
|
void |
keys(boolean b)
Toggle searchable keys
|
Searchable |
searchAttribute(SearchAttribute searchAttribute)
Add a search attribute
|
void |
setAllowDynamicIndexing(boolean allow)
Allow or disallow dynamic search attribute extraction
|
void |
setKeys(boolean keys)
Toggle searchable keys
|
void |
setValues(boolean values)
Toggle searchable values
|
boolean |
values()
Are values searchable?
|
void |
values(boolean b)
Toggle searchable values
|
public static final boolean KEYS_DEFAULT
public static final boolean VALUES_DEFAULT
public static final boolean DYNAMIC_INDEXING_DEFAULT
private final java.util.Map<java.lang.String,SearchAttribute> searchAttributes
private boolean frozen
private boolean keys
private boolean values
private boolean allowDynamicIndexing
public void addSearchAttribute(SearchAttribute searchAttribute) throws InvalidConfigurationException
searchAttribute
- to addInvalidConfigurationException
- if an attribute already exists for the same nameprivate void disallowBuiltins(java.lang.String attributeName)
private void checkDynamicChange()
public java.util.Map<java.lang.String,SearchAttribute> getSearchAttributes()
public Searchable searchAttribute(SearchAttribute searchAttribute)
searchAttribute
- attribute to addpublic void freezeConfiguration()
public java.util.Map<java.lang.String,SearchAttribute> getUserDefinedSearchAttributes()
public boolean keys()
public boolean values()
public boolean isDynamicIndexingAllowed()
public void values(boolean b)
b
- public void keys(boolean b)
b
- public void setKeys(boolean keys)
keys
- public void setValues(boolean values)
values
- public void setAllowDynamicIndexing(boolean allow)
allow
- public void allowDynamicIndexing(boolean allow)
allow
-