Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.archive.crawler.deciderules
Class DecideRule

    java.lang.Object
      javax.management.Attribute
          org.archive.crawler.settings.Type
              org.archive.crawler.settings.ComplexType
                  org.archive.crawler.settings.ModuleType
                      org.archive.crawler.deciderules.DecideRule

All Implemented Interfaces:
  java.io.Serializable, javax.management.DynamicMBean

Direct Known Subclasses:
  AcceptDecideRule, BeanShellDecideRule, ConfiguredDecideRule, DecideRuleSequence, FilterDecideRule, RejectDecideRule

    public class DecideRule

extends ModuleType

Interface for rules which, given an object to evaluate, respond with a decision: `ACCEPT`, `REJECT`, or `PASS`. Rules return `PASS` by default.

Author:
  gojomo
See Also:
  `DecideRuleSequence`, Serialized Form

Nested Class Summary

Nested classes/interfaces inherited from class org.archive.crawler.settings.ComplexType
`ComplexType.MBeanAttributeInfoIterator`

Field Summary
`static java.lang.String` | `ACCEPT`
`static java.lang.String` | `PASS`
`static java.lang.String` | `REJECT`

Fields inherited from class org.archive.crawler.settings.ComplexType
`definition, definitionMap`

Constructor Summary
`DecideRule(java.lang.String name)` Constructor.

Method Summary
`java.lang.Object` | `decisionFor(java.lang.Object object)` Make decision on passed `object`.
`CrawlController` | `getController()` Get the controller object.
`void` | `kickUpdate()` Respond to a settings update, refreshing any internal settings-derived state.
`java.lang.Object` | `singlePossibleNonPassDecision(java.lang.Object object)` If this rule is "one-way" -- can only return a single possible decision other than PASS -- return that decision.

Methods inherited from class org.archive.crawler.settings.ModuleType
`addElement, listUsedFiles`

Methods inherited from class org.archive.crawler.settings.ComplexType
`addElementToDefinition, checkValue, earlyInitialize, getAbsoluteName, getAttribute, getAttribute, getAttribute, getAttributeInfo, getAttributeInfo, getAttributeInfoIterator, getAttributes, getDataContainerRecursive, getDataContainerRecursive, getDefaultValue, getDescription, getElementFromDefinition, getLegalValues, getLocalAttribute, getMBeanInfo, getMBeanInfo, getParent, getPreservedFields, getSettingsHandler, getUncheckedAttribute, getValue, globalSettings, invoke, isInitialized, isOverridden, iterator, removeElementFromDefinition, setAsOrder, setAttribute, setAttribute, setAttributes, setDescription, setPreservedFields, toString, unsetAttribute`

Methods inherited from class org.archive.crawler.settings.Type
`addConstraint, equals, getConstraints, getLegalValueType, isExpertSetting, isOverrideable, isTransient, setExpertSetting, setLegalValueType, setOverrideable, setTransient`

Methods inherited from class javax.management.Attribute
`getName`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### ACCEPT

    public static final java.lang.String ACCEPT

### REJECT

    public static final java.lang.String REJECT

### PASS

    public static final java.lang.String PASS

Constructor Detail

### DecideRule

    public DecideRule(java.lang.String name)

  Constructor.

  Parameters:
    `name` - Name of this rule.

Method Detail

### decisionFor

    public java.lang.Object decisionFor(java.lang.Object object)

  Make decision on passed `object`.

  Parameters:
    `object` - Object to rule on.
  Returns:
    `ACCEPT`, `REJECT`, or `PASS`.

### singlePossibleNonPassDecision

    public java.lang.Object singlePossibleNonPassDecision(java.lang.Object object)

  If this rule is "one-way" -- can only return a single possible decision other than PASS -- return that decision. Otherwise return null. Most rules will be one-way.

  Parameters:
    `object` -
  Returns:
    the one decision other than PASS this rule might return, if there is only one

### kickUpdate

    public void kickUpdate()

  Respond to a settings update, refreshing any internal settings-derived state. This method gives implementors a chance to refresh internal state after a settings change. Normally new settings are picked up w/o the need of work on the part of settings' clients but some facilities -- for example, Surt classes need to sort submissions into common-prefix-coalesced collection of Surt prefixes, or, settings changes that alter external file or seeds/directives references -- need to be flagged so they can take compensatory action.

### getController

    public CrawlController getController()

  Get the controller object.

  Returns:
    the controller object.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2008 Internet Archive. All Rights Reserved.