wt.fv
Class ReplicatorElemFinder

java.lang.Object
  extended bywt.fv.ReplicatorElemFinder

public class ReplicatorElemFinder
extends Object

| |* Implements methods that find elements to be replicated based on criterias *| |* established by the existance of FvPolicyRule objects in the database *| |


Constructor Summary
ReplicatorElemFinder()
           
 
Method Summary
private  QuerySpec addClauseCompContHolderWithPolicyItem(QuerySpec qs, Class cHolderClass, int idxCHolder, int idxPolicyItem)
          Method adds search clauses to query Spec which comare certain fields of ContentHolder with fields of FvPolicyItem
private  QuerySpec addClausesFromAppDataToContent(QuerySpec qs, int idxAppData, Class[] streamedContClasses, int[] streamedContIdx)
          Method adds search conditions to the QuerySpec connecting AplicationData and streamed Objects which it references of types supplied in streamedContClasses Input Args: qs - QuerySpec to which the search conditions will be added idxAppData - Index of ApplicationData.class in the query spec streamedContClasses - Array of classes(they must implement wt.fc.Streamed interface) to be added to query streamedContIdx - Array of QuerySpec idexes of the classes in the streamedContClasses
private  QuerySpec addClausesFromCHolderToAppData(QuerySpec qs, Class cHolderClass, int idxCHolder, int idxAppData)
          Method adds clauses to query spec, which connect ConentHolder to all its ApplicationData objects.
private  Vector findAllContHolderClasses(ReplicaVault vault)
           
 Vector findEromOtherRemoteVaultItems(ReplicaVault vault, Vector rNum)
          | |* This method finds "Streamed" objects that have to be replicated in to *| |*the (OUR) ReplicaVault which was passed in as an argument.
 Vector findFromFvVaultsItems(ReplicaVault vault, Vector rNum)
          | |* Method finds all the items located in the filevaults on the master site, *| |* which shout be replicated according to the FvPolicyRule objects in the db*|
 Vector findFromOrigContentItems(ReplicaVault vault, Vector rNum)
          | |* Method finds all the items located in the database, *| |* which shout be replicated according to the FvPolicyRule objects in the db*|
 Vector findListUnreferencedReplicatedItems(ReplicaVault rVault, Class cHolder)
           
 Vector findListUnreferencedReplicatedItems1(ReplicaVault rVault, Class cHolder)
           
 QueryResult findListUnreferencedReplicatedItems2(ReplicaVault rVault, Class cHolder)
           
 Vector findRemotelyUploadedMasterContentItems(ReplicaVault rVault, int[] actual)
           
private  Class getClassObjectByName(String fullClassName)
           
private static void PP(String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicatorElemFinder

public ReplicatorElemFinder()
Method Detail

findFromFvVaultsItems

public Vector findFromFvVaultsItems(ReplicaVault vault,
                                    Vector rNum)
                             throws QueryException,
                                    WTException
| |* Method finds all the items located in the filevaults on the master site, *| |* which shout be replicated according to the FvPolicyRule objects in the db*|

Throws:
QueryException
WTException

findFromOrigContentItems

public Vector findFromOrigContentItems(ReplicaVault vault,
                                       Vector rNum)
                                throws QueryException,
                                       WTException
| |* Method finds all the items located in the database, *| |* which shout be replicated according to the FvPolicyRule objects in the db*|

Throws:
QueryException
WTException

findEromOtherRemoteVaultItems

public Vector findEromOtherRemoteVaultItems(ReplicaVault vault,
                                            Vector rNum)
                                     throws QueryException,
                                            WTException
| |* This method finds "Streamed" objects that have to be replicated in to *| |*the (OUR) ReplicaVault which was passed in as an argument. Query looks *| |*for objects that were allready replicated to a different ReplicaVault *| |*on the site where OUR vault resides. *| |* Input Args: vault : ReplicaVault for which replication runs *| |* Return object: Vector containing the set of found items. *| |* NOTE: Each element of the returned Vector is of type Persistable[] *| |* which consists of : *| |* [0] - (ReplicatedItem) found ReplicatedItem *| |* [1] - (ReplicaFolder) ReplicaFolder of the ReplicaVault residing *| |* the same Site as (OUR)ReplicaVault *|

Throws:
QueryException
WTException

findRemotelyUploadedMasterContentItems

public Vector findRemotelyUploadedMasterContentItems(ReplicaVault rVault,
                                                     int[] actual)
                                              throws QueryException,
                                                     WTException
Throws:
QueryException
WTException

findListUnreferencedReplicatedItems2

public QueryResult findListUnreferencedReplicatedItems2(ReplicaVault rVault,
                                                        Class cHolder)
                                                 throws QueryException,
                                                        WTException
Throws:
QueryException
WTException

findListUnreferencedReplicatedItems1

public Vector findListUnreferencedReplicatedItems1(ReplicaVault rVault,
                                                   Class cHolder)
                                            throws QueryException,
                                                   WTException
Throws:
QueryException
WTException

findListUnreferencedReplicatedItems

public Vector findListUnreferencedReplicatedItems(ReplicaVault rVault,
                                                  Class cHolder)
                                           throws QueryException,
                                                  WTException
Throws:
QueryException
WTException

addClausesFromCHolderToAppData

private QuerySpec addClausesFromCHolderToAppData(QuerySpec qs,
                                                 Class cHolderClass,
                                                 int idxCHolder,
                                                 int idxAppData)
                                          throws WTException
Method adds clauses to query spec, which connect ConentHolder to all its ApplicationData objects.

Throws:
WTException

addClausesFromAppDataToContent

private QuerySpec addClausesFromAppDataToContent(QuerySpec qs,
                                                 int idxAppData,
                                                 Class[] streamedContClasses,
                                                 int[] streamedContIdx)
                                          throws WTException
Method adds search conditions to the QuerySpec connecting AplicationData and streamed Objects which it references of types supplied in streamedContClasses Input Args: qs - QuerySpec to which the search conditions will be added idxAppData - Index of ApplicationData.class in the query spec streamedContClasses - Array of classes(they must implement wt.fc.Streamed interface) to be added to query streamedContIdx - Array of QuerySpec idexes of the classes in the streamedContClasses

Throws:
WTException

addClauseCompContHolderWithPolicyItem

private QuerySpec addClauseCompContHolderWithPolicyItem(QuerySpec qs,
                                                        Class cHolderClass,
                                                        int idxCHolder,
                                                        int idxPolicyItem)
                                                 throws WTException
Method adds search clauses to query Spec which comare certain fields of ContentHolder with fields of FvPolicyItem

Throws:
WTException

findAllContHolderClasses

private Vector findAllContHolderClasses(ReplicaVault vault)
                                 throws WTException
Throws:
WTException

getClassObjectByName

private Class getClassObjectByName(String fullClassName)
                            throws WTException
Throws:
WTException

PP

private static void PP(String message)