org.apache.jackrabbit.rmi.client
Class ClientObject

java.lang.Object
  extended by org.apache.jackrabbit.rmi.client.ClientObject
Direct Known Subclasses:
ClientAccessControlEntry, ClientAccessControlManager, ClientAccessControlPolicy, ClientItem, ClientItemDefinition, ClientIterator, ClientLock, ClientLockManager, ClientNamespaceRegistry, ClientNodeType, ClientNodeTypeManager, ClientObservationManager, ClientPrivilege, ClientQuery, ClientQueryManager, ClientQueryResult, ClientRow, ClientSession, ClientVersionManager, ClientWorkspace, SafeClientRepository

public class ClientObject
extends Object

Base class for client adapter objects. The only purpose of this class is to centralize the handling of the local adapter factory used by the client adapters to instantiate new adapters.


Constructor Summary
protected ClientObject(LocalAdapterFactory factory)
          Creates a basic client adapter that uses the given factory to create new adapters.
 
Method Summary
protected  LocalAdapterFactory getFactory()
          Returns the local adapter factory used to create new adapters.
protected  Item getItem(Session session, RemoteItem remote)
          Utility method to create a local adapter for a remote item.
protected  Node getNode(Session session, RemoteNode remote)
          Utility method to create a local adapter for a remote node.
protected  NodeType[] getNodeTypeArray(RemoteNodeType[] remotes)
          Utility method for creating an array of local node type adapters for an array of remote node types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientObject

protected ClientObject(LocalAdapterFactory factory)
Creates a basic client adapter that uses the given factory to create new adapters.

Parameters:
factory - local adapter factory
Method Detail

getFactory

protected LocalAdapterFactory getFactory()
Returns the local adapter factory used to create new adapters.

Returns:
local adapter factory

getItem

protected Item getItem(Session session,
                       RemoteItem remote)
Utility method to create a local adapter for a remote item. This method introspects the remote reference to determine whether to instantiate a Property, a Node, or an Item adapter using the local adapter factory.

If the remote item is a RemoteNode, this method delegates to getNode(Session, RemoteNode).

Parameters:
session - current session
remote - remote item
Returns:
local property, node, or item adapter

getNode

protected Node getNode(Session session,
                       RemoteNode remote)
Utility method to create a local adapter for a remote node. This method introspects the remote reference to determine whether to instantiate a Node, a VersionHistory, or a Version adapter using the local adapter factory.

Parameters:
session - current session
remote - remote node
Returns:
local node, version, or version history adapter

getNodeTypeArray

protected NodeType[] getNodeTypeArray(RemoteNodeType[] remotes)
Utility method for creating an array of local node type adapters for an array of remote node types. The node type adapters are created using the local adapter factory.

A null input is treated as an empty array.

Parameters:
remotes - remote node types
Returns:
local node type array


Copyright © 2011-2013 Adobe Systems Incorporated. All Rights Reserved.