wt.index
Interface IndexPolicyManager

All Known Implementing Classes:
IndexPolicyManagerFwd, StandardIndexPolicyManager

public interface IndexPolicyManager

The IndexPolicyManager presents an interface accessible also in the client to the functions provided in the server by the StandardIndexPolicyManager. These functions concern mostly the management of the cache: retrieving a list and updating the cache. This latter method should be called after a rule is modified.

Supported API: true

Extendable: false


Method Summary
 IndexPolicyRule addIndexPolicyRule(Selector selector)
          Creates and adds a new index policy rule for the given selector.
 Enumeration allIndexers()
          Returns all available indexers.
 void createIndexingRule(AdminDomainRef domain_ref, String type_id, String state_key, Vector collections)
          Creates an indexing rule defining which collections objects of a specified type should be entered into when the objects move to a specified life cycle state, within a domain.
 void deleteIndexingRule(AdminDomainRef domain_ref, String type_id, String state_key)
          Deletes an indexing rule defining which collections objects of a specified type should be entered into when the objects move to a specified life cycle state, within a domain.
 void deleteIndexingRules(AdminDomainRef domain_ref)
          Deletes all indexing rules within a domain.
 IndexPolicyList getIndexPolicyList(Selector selector)
          

Supported API: false
 IndexPolicyRule getIndexPolicyRule(Selector selector)
          Returns the index policy rule for the specified selector.
 Enumeration getIndexPolicyRules(AdminDomainRef domain_ref)
          Returns all the index policy rules for the specified domain in the form of an enumeration.
 void index(Indexable targetObject)
          Index targetObject.
 void index(WTCollection targetCollection)
          Index targetCollection.
 void removeIndex(Indexable targetObject)
          

Supported API: false
 void removeIndex(WTCollection targetCollection)
          Remove targetObject from indexes.
 IndexPolicyRule removeIndexPolicyRule(Selector selector)
          Removes the index policy rule for the given selector.
 void subscribe(com.objectspace.jgl.OrderedSet event_list)
          Subscribe to the events contained in the set.
 void testIndexToRware(String refString)
          

Supported API: false
 Void testUpdateIndex(String oid, String collection_name)
          

Supported API: false
 void unsubscribe(com.objectspace.jgl.OrderedSet event_list)
          Removes the subscription to the events in the list.
 void updateIndexingRule(AdminDomainRef domain_ref, String type_id, String state_key, Vector collections)
          Updates an indexing rule defining which collections objects of a specified type should be entered into when the objects move to a specified life cycle state, within a domain.
 void updateIndexPolicyLists(Selector selector)
          Updates the policy list for the given selector and all lists whose selector is more specific than the given one.
 

Method Detail

createIndexingRule

public void createIndexingRule(AdminDomainRef domain_ref,
                               String type_id,
                               String state_key,
                               Vector collections)
                        throws WTException
Creates an indexing rule defining which collections objects of a specified type should be entered into when the objects move to a specified life cycle state, within a domain.

Supported API: false

Parameters:
domain_ref - reference to the domain the rule is for
type_id - logical or persisted type identifier
state_key - life cycle state key (State.toString() value, or null for all states)
collections - collection names (Vector of String)
Throws:
WTException

deleteIndexingRule

public void deleteIndexingRule(AdminDomainRef domain_ref,
                               String type_id,
                               String state_key)
                        throws WTException
Deletes an indexing rule defining which collections objects of a specified type should be entered into when the objects move to a specified life cycle state, within a domain.

Supported API: false

Parameters:
domain_ref - reference to the domain the rule is for
type_id - logical or persisted type identifier
state_key - life cycle state key (State.toString() value, or null for all states)
Throws:
WTException

deleteIndexingRules

public void deleteIndexingRules(AdminDomainRef domain_ref)
                         throws WTException
Deletes all indexing rules within a domain.

This method is intended for testing purposes only, to support automated tests that need to reinitialize the testing environment.

Supported API: false

Parameters:
domain_ref - reference to the domain the rule is for
Throws:
WTException

updateIndexingRule

public void updateIndexingRule(AdminDomainRef domain_ref,
                               String type_id,
                               String state_key,
                               Vector collections)
                        throws WTException
Updates an indexing rule defining which collections objects of a specified type should be entered into when the objects move to a specified life cycle state, within a domain.

Supported API: false

Parameters:
domain_ref - reference to the domain the rule is for
type_id - logical or persisted type identifier
state_key - life cycle state key (State.toString() value, or null for all states)
collections - collection names (Vector of String)
Throws:
WTException

updateIndexPolicyLists

public void updateIndexPolicyLists(Selector selector)
                            throws WTException
Updates the policy list for the given selector and all lists whose selector is more specific than the given one. This method should be used after a rule is updated so that the lists are kept in synch with the rules.

Supported API: false

Parameters:
selector -
Throws:
WTException

addIndexPolicyRule

public IndexPolicyRule addIndexPolicyRule(Selector selector)
                                   throws WTException
Creates and adds a new index policy rule for the given selector. If the rule already exists it is returned.

Supported API: false

Parameters:
selector -
Returns:
IndexPolicyRule
Throws:
WTException

getIndexPolicyRule

public IndexPolicyRule getIndexPolicyRule(Selector selector)
                                   throws WTException
Returns the index policy rule for the specified selector. Returns null if the rule doesn't exist.

Supported API: false

Parameters:
selector -
Returns:
IndexPolicyRule
Throws:
WTException

getIndexPolicyRules

public Enumeration getIndexPolicyRules(AdminDomainRef domain_ref)
                                throws WTException
Returns all the index policy rules for the specified domain in the form of an enumeration.

Supported API: false

Parameters:
domain_ref -
Returns:
Enumeration
Throws:
WTException

removeIndexPolicyRule

public IndexPolicyRule removeIndexPolicyRule(Selector selector)
                                      throws WTException
Removes the index policy rule for the given selector.

Supported API: false

Parameters:
selector -
Returns:
IndexPolicyRule
Throws:
WTException

allIndexers

public Enumeration allIndexers()
                        throws WTException
Returns all available indexers.

Supported API: false

Returns:
Enumeration
Throws:
WTException

subscribe

public void subscribe(com.objectspace.jgl.OrderedSet event_list)
               throws WTException
Subscribe to the events contained in the set. This method is called after a rule is created or modified. If the event is already subscribed to nothing happens.

Supported API: false

Parameters:
event_list -
Throws:
WTException

unsubscribe

public void unsubscribe(com.objectspace.jgl.OrderedSet event_list)
                 throws WTException
Removes the subscription to the events in the list. This method is called after a rule is modified or deleted. If the event is referred to by another rule, nothing happens.

Supported API: false

Parameters:
event_list -
Throws:
WTException

testUpdateIndex

public Void testUpdateIndex(String oid,
                            String collection_name)
                     throws WTException,
                            WTPropertyVetoException,
                            IOException


Supported API: false

Parameters:
oid -
collection_name -
Returns:
Void
Throws:
WTException
WTPropertyVetoException
IOException

testIndexToRware

public void testIndexToRware(String refString)
                      throws WTException


Supported API: false

Parameters:
refString -
Throws:
WTException

index

public void index(WTCollection targetCollection)
           throws WTException
Index targetCollection. This is the method that is called when an event occurs (e.g. check-in) that requires indexing to be performed. It can also be called at any time to force indexing, although this is not recommended practice. The recommended practice is to allow the event listeners to index objects at the correct time, or by running the BulkIndexTool.

Supported API: true

Parameters:
targetCollection - The targetCollection is the collection of objects that are going to be indexed based on an event or from the bulk index tool
Throws:
WTException

removeIndex

public void removeIndex(WTCollection targetCollection)
                 throws WTException
Remove targetObject from indexes. This is the method that is called when an Indexable object is deleted. This method assumes targetObject has been deleted and should only be called when that is the case. Otherwise, indexing and the indexing rules will be inconsistent.

Supported API: false

Parameters:
targetCollection - The targetCollection is the collection of objects that are going to be removed from the indexes based on an event
Throws:
WTException

index

public void index(Indexable targetObject)
           throws WTException
Index targetObject. This is the method that is called when an event occurs (e.g. check-in) that requires indexing to be performed. It can also be called at any time to force indexing, although this is not recommended practice. The recommended practice is to allow the event listeners to index objects at the correct time.

Supported API: false

Parameters:
targetObject -
Throws:
WTException

removeIndex

public void removeIndex(Indexable targetObject)
                 throws WTException


Supported API: false

Parameters:
targetObject -
Throws:
WTException

getIndexPolicyList

public IndexPolicyList getIndexPolicyList(Selector selector)
                                   throws WTException


Supported API: false

Parameters:
selector -
Returns:
IndexPolicyList
Throws:
WTException