|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.management.Attribute org.archive.crawler.settings.Type org.archive.crawler.settings.ComplexType org.archive.crawler.settings.MapType
public class MapType
This class represents a container of settings. This class is usually used to make it possible to have a dynamic number of ModuleTypes like for instance a list of filters of different type. When this type is overridden on a per domain basis, the following restrictions apply:
Filter
class.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.archive.crawler.settings.ComplexType |
---|
ComplexType.Context, ComplexType.MBeanAttributeInfoIterator |
Field Summary |
---|
Fields inherited from class org.archive.crawler.settings.ComplexType |
---|
definitionMap |
Constructor Summary | |
---|---|
MapType(java.lang.String name,
java.lang.String description)
Construct a new MapType object. |
|
MapType(java.lang.String name,
java.lang.String description,
java.lang.Class type)
Construct a new MapType object. |
Method Summary | |
---|---|
void |
addConstraint(Constraint constraint)
Add a constraint to this type. |
Type |
addElement(CrawlerSettings settings,
Type element)
Add a new element to this map. |
(package private) Constraint.FailedCheck |
checkValue(CrawlerSettings settings,
java.lang.String attributeName,
Type definition,
java.lang.Object value)
|
java.util.List |
getConstraints()
Returns a list of constraints for the value of this type. |
java.lang.Class |
getContentType()
Get the content type allowed for this map. |
(package private) Type |
getDefinition(java.lang.String attributeName)
Get the content type definition for attributes of this map. |
boolean |
isEmpty(java.lang.Object context)
Returns true if this map is empty. |
boolean |
moveElementDown(CrawlerSettings settings,
java.lang.String name)
Move an attribute down one place in the list. |
boolean |
moveElementUp(CrawlerSettings settings,
java.lang.String name)
Move an attribute up one place in the list. |
java.lang.Object |
removeElement(CrawlerSettings settings,
java.lang.String name)
Remove an attribute from the map. |
int |
size(java.lang.Object context)
Get the number of elements in this map. |
Methods inherited from class org.archive.crawler.settings.Type |
---|
equals, getLegalValueType, isExpertSetting, isOverrideable, isTransient, setExpertSetting, setLegalValueType, setOverrideable, setTransient |
Methods inherited from class javax.management.Attribute |
---|
getName, hashCode |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public MapType(java.lang.String name, java.lang.String description)
name
- the name of this element.description
- the description of the attribute.public MapType(java.lang.String name, java.lang.String description, java.lang.Class type)
name
- the name of this element.description
- the description of the attribute.type
- the type allowed for this mapMethod Detail |
---|
public Type addElement(CrawlerSettings settings, Type element) throws javax.management.InvalidAttributeValueException
addElement
in class ComplexType
settings
- the settings object for this method to have effect.element
- the element to be added.
javax.management.InvalidAttributeValueException
public java.lang.Object removeElement(CrawlerSettings settings, java.lang.String name) throws javax.management.AttributeNotFoundException
settings
- the settings object for which this method has effect.name
- name of the attribute to remove.
javax.management.AttributeNotFoundException
- is thrown if there is no attribute
with the submitted name.public boolean moveElementUp(CrawlerSettings settings, java.lang.String name) throws javax.management.AttributeNotFoundException
settings
- the settings object for which this method has effect.name
- name of attribute to move.
javax.management.AttributeNotFoundException
- is thrown if there is no attribute
with the submitted name.public boolean moveElementDown(CrawlerSettings settings, java.lang.String name) throws javax.management.AttributeNotFoundException
settings
- the settings object for which this method has effect.name
- name of attribute to move.
javax.management.AttributeNotFoundException
- is thrown if there is no attribute
with the submitted name.public boolean isEmpty(java.lang.Object context)
context
- the settings object for which this set of elements
are valid.
public int size(java.lang.Object context)
context
- the settings object for which this set of elements
are valid.
Type getDefinition(java.lang.String attributeName)
getDefinition
in class ComplexType
attributeName
- since all attributes of a map are of the same type,
this value is not used.
public java.lang.Class getContentType()
Constraint.FailedCheck checkValue(CrawlerSettings settings, java.lang.String attributeName, Type definition, java.lang.Object value)
checkValue
in class ComplexType
public void addConstraint(Constraint constraint)
Type
addConstraint
in class Type
constraint
- the constraint to add.public java.util.List getConstraints()
Type
getConstraints
in class Type
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |