com.vinculumtech.carrierwave.session
Class RepositoryClient

java.lang.Object
  extended bycom.vinculumtech.carrierwave.session.RepositoryClient

public class RepositoryClient
extends java.lang.Object

The RepositoryClient class is the root class for all interactions with the remote graph plan repository and local graph plan repository source instances.

The local graph plan sources are adapters for various repository like services. All sources must be interacted with directly. Any retrieve or store via the RepositoryClient interface is directly with the default source on the remote server.
The authoritative source is the only exception. Any invocation with the remote server via the QueryClient interface that uses a graphPlanName parameter will consult the authoritative source for an instance of a 'local' GraphPlan instance with that given name. If found, that instance will be passed to the server, instead of the name.

Version:
$Id: //depot/carrierwave/src/shared/com/vinculumtech/carrierwave/session/RepositoryClient.java#13 $
See Also:
ClientSession, QueryClient

Method Summary
 void finalize()
           
 java.util.Collection getAllClientGraphPlanSourceNames()
          Returns a Collection of all the registered GraphPlanSource names.
 GraphPlan getClientAuthoritativeGraphPlan(java.lang.String graphPlanName)
          Returns a GraphPlan instance that is authoritative to this client session.
 GraphPlanSource getClientAuthoritativeSource()
          Retrieves the current authoritative GraphPlanSource.
 GraphPlanSource getClientGraphPlanSource(java.lang.String sourceName)
          Returns a GraphPlanSource instance with the given name.
 ClientSession getClientSession()
           
protected  CommonClient getCommonClient()
           
 ImageTypeMap getDefaultImageTypeMap()
          Returns the default image type map supported by the remote server
 java.util.List listGraphPlanNames(java.lang.String sourceName)
          Lists all available GraphPlans in the given source named sourceName.
 void makeClientAuthoritativeSource(java.lang.String sourceName)
          Makes a previously registered local GraphPlanSource authoritative.
 void registerClientGraphPlanSource(GraphPlanSource graphPlanSource)
          Registers a GraphPlanSource instance locally.
 boolean removeGraphPlan(java.lang.String graphPlanName)
          Removes the GraphPlan instance specified by the given graphPlanName.
 GraphPlan retrieveGraphPlan(java.lang.String name)
          Returns a GraphPlan with the given name from the server repsoitory.
 void storeGraphPlan(GraphPlan graphPlan)
          Saves the given GraphPlan to the server repository.
 void storeGraphPlan(java.lang.String sourceName, GraphPlan graphPlan)
          Saves the given GraphPlan to the server repository using the given sourceName.
 GraphPlanSource unregisterClientGraphPlanSource(java.lang.String sourceName)
          Unregisters a local GraphPlanSource with the given name.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getClientSession

public ClientSession getClientSession()

getCommonClient

protected CommonClient getCommonClient()
                                throws NotConnectedException,
                                       ClientSessionException
Throws:
NotConnectedException
ClientSessionException

getDefaultImageTypeMap

public ImageTypeMap getDefaultImageTypeMap()
                                    throws ClientSessionException
Returns the default image type map supported by the remote server

Throws:
ClientSessionException

retrieveGraphPlan

public GraphPlan retrieveGraphPlan(java.lang.String name)
                            throws GraphPlanException,
                                   ClientSessionException
Returns a GraphPlan with the given name from the server repsoitory.

Parameters:
name -
Returns:
Throws:
GraphPlanException
ClientSessionException

removeGraphPlan

public boolean removeGraphPlan(java.lang.String graphPlanName)
                        throws GraphPlanException,
                               ClientSessionException
Removes the GraphPlan instance specified by the given graphPlanName. If the name is versioned, only that version will be removed. If the name is not versioned (the default name), all versions will be removed.

Parameters:
graphPlanName -
Returns:
Throws:
GraphPlanException
ClientSessionException

storeGraphPlan

public void storeGraphPlan(GraphPlan graphPlan)
                    throws GraphPlanException,
                           ClientSessionException
Saves the given GraphPlan to the server repository.

Parameters:
graphPlan -
Throws:
GraphPlanException
ClientSessionException

storeGraphPlan

public void storeGraphPlan(java.lang.String sourceName,
                           GraphPlan graphPlan)
                    throws GraphPlanException,
                           ClientSessionException
Saves the given GraphPlan to the server repository using the given sourceName.

Parameters:
sourceName -
graphPlan -
Throws:
GraphPlanException
ClientSessionException

listGraphPlanNames

public java.util.List listGraphPlanNames(java.lang.String sourceName)
                                  throws GraphPlanException,
                                         ClientSessionException
Lists all available GraphPlans in the given source named sourceName.

Parameters:
sourceName -
Returns:
Throws:
GraphPlanException
ClientSessionException

getClientAuthoritativeGraphPlan

public GraphPlan getClientAuthoritativeGraphPlan(java.lang.String graphPlanName)
                                          throws GraphPlanException
Returns a GraphPlan instance that is authoritative to this client session.

Parameters:
graphPlanName -
Returns:
Throws:
GraphPlanException

getClientAuthoritativeSource

public GraphPlanSource getClientAuthoritativeSource()
Retrieves the current authoritative GraphPlanSource. null is returned if none is available.

Returns:

makeClientAuthoritativeSource

public void makeClientAuthoritativeSource(java.lang.String sourceName)
Makes a previously registered local GraphPlanSource authoritative.

Parameters:
sourceName -

registerClientGraphPlanSource

public void registerClientGraphPlanSource(GraphPlanSource graphPlanSource)
Registers a GraphPlanSource instance locally.

Parameters:
graphPlanSource -

unregisterClientGraphPlanSource

public GraphPlanSource unregisterClientGraphPlanSource(java.lang.String sourceName)
Unregisters a local GraphPlanSource with the given name.

Parameters:
sourceName -
Returns:

getClientGraphPlanSource

public GraphPlanSource getClientGraphPlanSource(java.lang.String sourceName)
Returns a GraphPlanSource instance with the given name.

Parameters:
sourceName -
Returns:

getAllClientGraphPlanSourceNames

public java.util.Collection getAllClientGraphPlanSourceNames()
Returns a Collection of all the registered GraphPlanSource names.

Returns:

finalize

public void finalize()


Copyright (C) 2002 Vinculum Technologies, Inc. All Rights Reserved.