wt.fv.master
Interface MasterService

All Known Implementing Classes:
MasterServiceFwd, StandardMasterService

public interface MasterService



Supported API: true

Extendable: false


Method Summary
 ReplicaFolder addFolder(ReplicaVault vault, ReplicaFolder folder)
          Add a folder to a given vault.
 FvPolicyRule addRemotePolicyRule(FvPolicyRule rule)
          Adds a policy rule.
 void broadcastConfig(Site site)
          Broadcasts configuration to the replica site.
 Vector getAllContentReplSites()
          Retrieves all sites which are able to participate in the Content Replication process.
 FvPolicyRule[] getAllRemotePolicyRules(String domainName)
          Returns all of the policy rules

Supported API: false
 Vector getAlternativeURLs(ApplicationData appData, ContentHolder holder, boolean downloadFromMaster)
          The method returns a vector of URLs.
 Site getCurrentPreferredSite()
          Retrieves the current preferred site for the active principal.
 Vector getFolders(Site site, ReplicaVault vault)
          Returns all folders in a vault as an Enumeration.
 FvPolicyItem[] getRemotePolicyItems(Selector sel)
          

Supported API: false
 Enumeration getRemotePolicyRules(ReplicaVault vault)
          

Supported API: false
 Enumeration getRemotePolicyRules(Selector sel)
          Returns a policy rule for a given selector.
 Vector getRemoteVaults(Site site)
          

Supported API: false
 FvMount mountFolder(FvHost host, ReplicaFolder folder, String path)
          Mounts a replica folder to a given host.
 ReplicaFolder moveFolder(ReplicaFolder folder, ReplicaVault newVault)
          Moves a folder to another vault.
 void purgeReplicatedItems(Site site, ReplicaVault vault, boolean fullPurge)
          Method deletes all ReplicatedItem objects belonging to supplied site, vault pair.
 void setPreferredSite(Site site)
          Set the preferred site for content cache and content replication for the current user.
 

Method Detail

addRemotePolicyRule

public FvPolicyRule addRemotePolicyRule(FvPolicyRule rule)
                                 throws WTException
Adds a policy rule. A policy rule will not be added if a different policy rule exists for vault from the same site and a given selector.

Supported API: true

Parameters:
rule -
Returns:
FvPolicyRule
Throws:
WTException

getRemotePolicyRules

public Enumeration getRemotePolicyRules(Selector sel)
                                 throws WTException
Returns a policy rule for a given selector.

Supported API: false

Parameters:
sel -
Returns:
Enumeration
Throws:
WTException

getRemotePolicyRules

public Enumeration getRemotePolicyRules(ReplicaVault vault)
                                 throws WTException


Supported API: false

Parameters:
vault -
Returns:
Enumeration
Throws:
WTException

getAllRemotePolicyRules

public FvPolicyRule[] getAllRemotePolicyRules(String domainName)
                                       throws WTException
Returns all of the policy rules

Supported API: false

Parameters:
domainName -
Returns:
FvPolicyRule[]
Throws:
WTException

addFolder

public ReplicaFolder addFolder(ReplicaVault vault,
                               ReplicaFolder folder)
                        throws WTException
Add a folder to a given vault. The specified folder's number will define an order in which the folder is going to be used in a vault.

Specifying a number that already exists for a given vault results in shifting vaults to make a room for a new one.

Specifying -1 results in adding a folder to the end of the list.

Supported API: true

Parameters:
vault -
folder -
Returns:
ReplicaFolder
Throws:
WTException

getFolders

public Vector getFolders(Site site,
                         ReplicaVault vault)
                  throws WTException
Returns all folders in a vault as an Enumeration. If the vault is null than the list of all folders in the system is returned.

Supported API: false

Parameters:
site -
vault -
Returns:
Vector
Throws:
WTException

getRemoteVaults

public Vector getRemoteVaults(Site site)
                       throws WTException


Supported API: false

Parameters:
site -
Returns:
Vector
Throws:
WTException

mountFolder

public FvMount mountFolder(FvHost host,
                           ReplicaFolder folder,
                           String path)
                    throws WTPropertyVetoException,
                           WTException
Mounts a replica folder to a given host.

Supported API: true

Parameters:
host -
folder -
path -
Returns:
FvMount
Throws:
WTPropertyVetoException
WTException

moveFolder

public ReplicaFolder moveFolder(ReplicaFolder folder,
                                ReplicaVault newVault)
                         throws WTException,
                                WTPropertyVetoException
Moves a folder to another vault.

Supported API: false

Parameters:
folder - the folder to be moved.
newVault - the vault that the folder is to be moved to.
Returns:
ReplicaFolder
Throws:
WTException
WTPropertyVetoException

getRemotePolicyItems

public FvPolicyItem[] getRemotePolicyItems(Selector sel)
                                    throws WTException


Supported API: false

Parameters:
sel -
Returns:
FvPolicyItem[]
Throws:
WTException

getAlternativeURLs

public Vector getAlternativeURLs(ApplicationData appData,
                                 ContentHolder holder,
                                 boolean downloadFromMaster)
                          throws QueryException,
                                 WTException,
                                 IOException
The method returns a vector of URLs. Every URL allows to reach content from preferrable sites. The content corresponds to the given ApplicationData and ContentHolder. In the case downloadFromMaster is true the URL to master site is included In the case downloadFromMaster is false the URL to master site is excluded.

Supported API: false

Parameters:
appData -
holder -
downloadFromMaster -
Returns:
Vector
Throws:
QueryException
WTException
IOException

purgeReplicatedItems

public void purgeReplicatedItems(Site site,
                                 ReplicaVault vault,
                                 boolean fullPurge)
                          throws WTException
Method deletes all ReplicatedItem objects belonging to supplied site, vault pair. If vault is supplied as null, all ReplicatedItems for the site get deleted

Supported API: false

Parameters:
site -
vault -
fullPurge -
Throws:
WTException

broadcastConfig

public void broadcastConfig(Site site)
                     throws WTException
Broadcasts configuration to the replica site.

Supported API: true

Parameters:
site -
Throws:
WTException

getAllContentReplSites

public Vector getAllContentReplSites()
                              throws WTException
Retrieves all sites which are able to participate in the Content Replication process.

Supported API: true

Returns:
Vector
Throws:
WTException

getCurrentPreferredSite

public Site getCurrentPreferredSite()
                             throws WTException
Retrieves the current preferred site for the active principal. If no preferred site is set for the active principal, returns null.

Supported API: true

Returns:
Site
Throws:
WTException

setPreferredSite

public void setPreferredSite(Site site)
                      throws WTException
Set the preferred site for content cache and content replication for the current user.

Supported API: false

Parameters:
site -
Throws:
WTException