atg.targeting
Interface Targeter

All Known Implementing Classes:
DynamicContentTargeter, PromotionUpsellProductTargeter, PromotionUpsellTargeter, RepositoryItemSlot, Slot

public interface Targeter

Represents an object that can perform targeting operations based on some criteria. For example, a rule-based Targeter may use a set of targeting rules to traverse some search space and obtain a set of items matching the targeting rules. Other targeters may be based on different techniques, such as fuzzy matching, collaborative filtering, etc.

See Also:
NameResolver

Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static int NO_MAX_NUMBER
          Indicates that no pMaxNumber has been specified
static int NO_START_INDEX
          Indicates that no pStartIndex has been specified
 
Method Summary
 java.lang.Object[] target(NameResolver pNameResolver)
          Performs a targeting operation, returning an array of "target" objects.
 java.lang.Object[] target(NameResolver pNameResolver, int pMaxNumber)
          Performs a targeting operation, returning an array of "target" objects containing at most pMaxNumber elements.
 java.lang.Object[] target(NameResolver pNameResolver, int pStartIndex, int pMaxNumber)
          Performs a targeting operation, returning an array of "target" objects, beginning at the starting index of the entire result set, and containing at most pMaxNumber elements.
 

Field Detail

CLASS_VERSION

static final java.lang.String CLASS_VERSION
Class version string

See Also:
Constant Field Values

NO_START_INDEX

static final int NO_START_INDEX
Indicates that no pStartIndex has been specified

See Also:
Constant Field Values

NO_MAX_NUMBER

static final int NO_MAX_NUMBER
Indicates that no pMaxNumber has been specified

See Also:
Constant Field Values
Method Detail

target

java.lang.Object[] target(NameResolver pNameResolver)
                          throws atg.targeting.TargetingException
Performs a targeting operation, returning an array of "target" objects. The NameResolver argument carries information about the source objects associated with the targeting operation - the "context" of the targeting operation.

Returns null if no items are found matching the targeting criteria.

Throws:
TargetingException - if a problem was encountered during the targeting operation

target

java.lang.Object[] target(NameResolver pNameResolver,
                          int pMaxNumber)
                          throws atg.targeting.TargetingException
Performs a targeting operation, returning an array of "target" objects containing at most pMaxNumber elements. The NameResolver argument carries information about the source objects associated with the targeting operation - the "context" of the targeting operation.

Returns null if no items are found matching the targeting criteria.

Parameters:
pMaxNumber - the maximum number of elements to return; if -1, the entire result set will be retrieved
Throws:
TargetingException - if a problem was encountered during the targeting operation

target

java.lang.Object[] target(NameResolver pNameResolver,
                          int pStartIndex,
                          int pMaxNumber)
                          throws atg.targeting.TargetingException
Performs a targeting operation, returning an array of "target" objects, beginning at the starting index of the entire result set, and containing at most pMaxNumber elements. The NameResolver argument carries information about the source objects associated with the targeting operation - the "context" of the targeting operation.

Returns null if no items are found matching the targeting criteria, or if the number of items found is smaller than the specified starting index.

Parameters:
pStartIndex - the starting index; must be >= 0
pMaxNumber - the maximum number of elements to return; if -1, the entire result set starting at index pStartIndex will be retrieved
Throws:
TargetingException - if a problem was encountered during the targeting operation