|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.endeca.itl.cas.api.ModuleConfig
public abstract class ModuleConfig
Abstract class that supports specifying an ID and a list of properties as part of configuring a module.
Field Summary | |
---|---|
protected ModuleId |
mModuleId
|
protected List<ModuleProperty> |
mModuleProperties
|
Constructor Summary | |
---|---|
ModuleConfig()
|
|
ModuleConfig(ModuleId moduleId)
|
Method Summary | |
---|---|
void |
addModuleProperty(ModuleProperty moduleProperty)
Add a new ModuleProperty to the current list. |
boolean |
equals(Object other)
Compares the list of module properties as a set. |
ModuleId |
getModuleId()
|
List<ModuleProperty> |
getModuleProperties()
Returns the Properties used for configuring the module. |
ModuleProperty |
getProperty(String key)
Gets the (first) ModuleProperty object that has been set for a given key. |
List<String> |
getPropertyValues(String key)
Returns all values that have been set for a given key |
String |
getSingletonPropertyValue(String key)
Returns the single module property value specified by the key |
String |
getSingletonPropertyValue(String key,
String defaultValue)
Returns the single module property value specified by the key |
Boolean |
getSingletonPropertyValueAsBoolean(String key)
Returns the single module property value specified by the key |
boolean |
getSingletonPropertyValueAsBoolean(String key,
boolean defaultValue)
Returns the single module property value specified by the key |
Integer |
getSingletonPropertyValueAsInteger(String key)
|
Integer |
getSingletonPropertyValueAsInteger(String key,
int defaultValue)
|
int |
hashCode()
|
boolean |
hasProperty(String key)
Checks if a ModuleProperty exists for a given key. |
boolean |
hasPropertyValue(String key)
|
void |
setModuleId(ModuleId moduleId)
Set the identifier for the module being configured. |
void |
setModuleProperties(List<ModuleProperty> moduleProperties)
Replace list of module properties with given list. |
void |
setModulePropertyValues(String key,
String... values)
Sets the property values for the specified property key. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ModuleId mModuleId
protected List<ModuleProperty> mModuleProperties
Constructor Detail |
---|
public ModuleConfig()
public ModuleConfig(ModuleId moduleId)
Method Detail |
---|
public ModuleId getModuleId()
public void setModuleId(ModuleId moduleId)
moduleId
- public List<ModuleProperty> getModuleProperties()
public void setModuleProperties(List<ModuleProperty> moduleProperties)
moduleProperties
- list to use instead.public void addModuleProperty(ModuleProperty moduleProperty)
moduleProperty
- to addpublic ModuleProperty getProperty(String key)
key
-
public boolean hasProperty(String key)
key
-
public boolean hasPropertyValue(String key)
key
-
public List<String> getPropertyValues(String key)
key
-
public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
public String getSingletonPropertyValue(String key)
key
-
IllegalStateException
- if this module property has multiple values.public String getSingletonPropertyValue(String key, String defaultValue)
key
- defaultValue
-
IllegalStateException
- if this module property has multiple values.public Boolean getSingletonPropertyValueAsBoolean(String key)
key
-
public boolean getSingletonPropertyValueAsBoolean(String key, boolean defaultValue)
key
- defaultValue
-
public Integer getSingletonPropertyValueAsInteger(String key)
key
-
public Integer getSingletonPropertyValueAsInteger(String key, int defaultValue)
key
- defaultValue
-
public void setModulePropertyValues(String key, String... values)
key
- values
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |