Method Summary |
|
public Type | addElement(CrawlerSettings settings, Type type) |
public Type | addElementToDefinition(Type type) Add a new attribute to the definition of this ComplexType.
This method can only be called before the ComplexType has been
initialized. |
public FailedCheck | checkValue(CrawlerSettings settings, String attributeName, Object value) Check an attribute to see if it fulfills all the constraints set on the
definition of this attribute.
Parameters: settings - the CrawlerSettings object for which this check wasexecuted. Parameters: attributeName - the name of the attribute to check. Parameters: value - the value to check. |
FailedCheck | checkValue(CrawlerSettings settings, String attributeName, Type definition, Object value) |
public void | earlyInitialize(CrawlerSettings settings) This method can be overridden in subclasses to do local
initialisation.
This method is run before the class has been updated with
information from settings files. |
public String | getAbsoluteName() Get the absolute name of this ComplexType. |
public Object | getAttribute(String name) Obtain the value of a specific attribute from the crawl order.
If the attribute doesn't exist in the crawl order, the default
value will be returned.
Parameters: name - the name of the attribute to be retrieved. |
public Object | getAttribute(String name, CrawlURI uri) Obtain the value of a specific attribute that is valid for a
specific CrawlURI.
This method will try to get the attribute from the host settings
valid for the CrawlURI. |
public Object | getAttribute(Object context, String name) Obtain the value of a specific attribute that is valid for a specific
CrawlerSettings object.
This method will first try to get a settings object from the supplied
context, then try to look up the attribute from this settings object. |
public MBeanAttributeInfo | getAttributeInfo(CrawlerSettings settings, String name) Get the effective Attribute info for an element of this type from
a settings object.
Parameters: settings - the settings object for which the Attribute info iseffective. Parameters: name - the name of the element to get the attribute for. |
public MBeanAttributeInfo | getAttributeInfo(String name) Get the Attribute info for an element of this type from the global
settings.
Parameters: name - the name of the element to get the attribute for. |
public MBeanAttributeInfoIterator | getAttributeInfoIterator(Object context) Get an Iterator over all the MBeanAttributeInfo in this ComplexType.
Parameters: context - the context for which this set of MBeanAttributeInfo are valid. |
public AttributeList | getAttributes(String[] name) |
protected DataContainer | getDataContainerRecursive(Context context) Get the active data container for this ComplexType for a specific
settings object.
If no value has been overridden on the settings object for this
ComplexType, then it traverses up until it find a DataContainer with
values for this ComplexType.
This method should probably not be called from user code. |
protected DataContainer | getDataContainerRecursive(Context context, String key) Get the active data container for this ComplexType for a specific
settings object.
If the key has not been overridden on the settings object for this
ComplexType, then it traverses up until it find a DataContainer with
the key for this ComplexType.
This method should probably not be called from user code. |
public Object | getDefaultValue() |
Type | getDefinition(String attributeName) Get the content type definition for an attribute.
Parameters: attributeName - the name of the attribute to get definition for. |
public String | getDescription() Get the description of this type
The description should be suitable for showing in a user interface. |
public Type | getElementFromDefinition(String name) Get an element definition from this complex type.
This method can only be called before the ComplexType has been
initialized. |
public Object[] | getLegalValues() |
public Object | getLocalAttribute(CrawlerSettings settings, String name) Obtain the value of a specific attribute that is valid for a
specific CrawlerSettings object.
This method will try to get the attribute from the supplied host
settings object. |
public MBeanInfo | getMBeanInfo() |
public MBeanInfo | getMBeanInfo(Object context) |
public ComplexType | getParent() Get the parent of this ComplexType. |
protected String[] | getPreservedFields() Get a list of attribute names that the complex type should attempt to
preserve if the module is exchanged with an other one. |
Context | getSettingsFromObject(Object o, String attributeName) Get settings object valid for a URI.
This method takes an object,
try to convert it into a
CrawlURI and then tries to get the
settings object from it. |
Context | getSettingsFromObject(Object o) Get settings object valid for a URI.
This method takes an object, try to convert it into a
CrawlURI and then tries to get the settings object from it. |
public SettingsHandler | getSettingsHandler() |
public Object | getUncheckedAttribute(Object context, String name) Obtain the value of a specific attribute that is valid for a specific
CrawlerSettings object.
This method will first try to get a settings object from the supplied
context, then try to look up the attribute from this settings object. |
public Object | getValue() Returns this object. |
public CrawlerSettings | globalSettings() Get the global settings object (aka order). |
public Object | invoke(String arg0, Object[] arg1, String[] arg2) |
public boolean | isInitialized() Returns true if this ComplexType is initialized. |
public boolean | isOverridden(CrawlerSettings settings, String name) Returns true if an element is overridden for this settings object.
Parameters: settings - the settings object to investigate. Parameters: name - the name of the element to check. |
public Iterator | iterator(Object context) Get an Iterator over all the attributes in this ComplexType.
Parameters: context - the context for which this set of attributes are valid. |
protected Type | removeElementFromDefinition(String name) This method can only be called before the ComplexType has been
initialized. |
protected void | setAsOrder(SettingsHandler settingsHandler) |
final public synchronized void | setAttribute(Attribute attribute) Set the value of a specific attribute of the ComplexType. |
final public synchronized void | setAttribute(CrawlerSettings settings, Attribute attribute) Set the value of a specific attribute of the ComplexType. |
public AttributeList | setAttributes(AttributeList attributes) |
public void | setDescription(String string) Set the description of this ComplexType
The description should be suitable for showing in a user interface. |
protected void | setPreservedFields(String[] preservedFields) Set a list of attribute names that the complex type should attempt to
preserve if the module is exchanged with an other one. |
public String | toString() |
public Object | unsetAttribute(CrawlerSettings settings, String name) Unset an attribute on a per host level.
This methods removes an override on a per host or per domain level.
Parameters: settings - the settings object for which the attribute should beunset. Parameters: name - the name of the attribute. |