Class ClientAdapterFactory

  • All Implemented Interfaces:
    LocalAdapterFactory
    Direct Known Subclasses:
    JackrabbitClientAdapterFactory

    @Deprecated(forRemoval=true)
    public class ClientAdapterFactory
    extends Object
    implements LocalAdapterFactory
    Deprecated, for removal: This API element is subject to removal in a future version.
    RMI support is deprecated and will be removed in a future version of Jackrabbit; see Jira ticket JCR-4972 for more information.

    Default implementation of the LocalAdapterFactory interface. This factory uses the client adapters defined in this package as the default adapter implementations. Subclasses can easily override or extend the default adapters by implementing the corresponding factory methods.

    • Constructor Detail

      • ClientAdapterFactory

        public ClientAdapterFactory()
        Deprecated, for removal: This API element is subject to removal in a future version.
    • Method Detail

      • getRepository

        public Repository getRepository​(RemoteRepository remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientRepository instance. Factory method for creating a local adapter for a remote repository.
        Specified by:
        getRepository in interface LocalAdapterFactory
        Parameters:
        remote - remote repository
        Returns:
        local repository adapter
      • getSession

        public Session getSession​(Repository repository,
                                  RemoteSession remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientSession instance. In case the remote session is transaction enabled, the returned session will be transaction enabled too through the ClientXASession. Factory method for creating a local adapter for a remote session.
        Specified by:
        getSession in interface LocalAdapterFactory
        Parameters:
        repository - current repository
        remote - remote session
        Returns:
        local session adapter
      • getWorkspace

        public Workspace getWorkspace​(Session session,
                                      RemoteWorkspace remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientWorkspace instance. Factory method for creating a local adapter for a remote workspace.
        Specified by:
        getWorkspace in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote workspace
        Returns:
        local workspace adapter
      • getNodeTypeManager

        public NodeTypeManager getNodeTypeManager​(RemoteNodeTypeManager remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClienNodeTypeManager instance. Factory method for creating a local adapter for a remote node type manager.
        Specified by:
        getNodeTypeManager in interface LocalAdapterFactory
        Parameters:
        remote - remote node type manager
        Returns:
        local node type manager adapter
      • getItem

        public Item getItem​(Session session,
                            RemoteItem remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientItem instance. Factory method for creating a local adapter for a remote item. Note that before calling this method, the client may want to introspect the remote item reference to determine whether to use the getNode or getProperty method instead, as the adapter returned by this method will only cover the basic Item interface.
        Specified by:
        getItem in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote item
        Returns:
        local item adapter
      • getProperty

        public Property getProperty​(Session session,
                                    RemoteProperty remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientProperty instance. Factory method for creating a local adapter for a remote property.
        Specified by:
        getProperty in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote property
        Returns:
        local property adapter
      • getNode

        public Node getNode​(Session session,
                            RemoteNode remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientNode instance. Factory method for creating a local adapter for a remote node.
        Specified by:
        getNode in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote node
        Returns:
        local node adapter
      • getVersion

        public Version getVersion​(Session session,
                                  RemoteVersion remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientVersion instance. Factory method for creating a local adapter for a remote version.
        Specified by:
        getVersion in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote version
        Returns:
        local version adapter
      • getVersionHistory

        public VersionHistory getVersionHistory​(Session session,
                                                RemoteVersionHistory remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientVersionHistory instance. Factory method for creating a local adapter for a remote version history.
        Specified by:
        getVersionHistory in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote version history
        Returns:
        local version history adapter
      • getNodeType

        public NodeType getNodeType​(RemoteNodeType remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientNodeType instance. Factory method for creating a local adapter for a remote node type.
        Specified by:
        getNodeType in interface LocalAdapterFactory
        Parameters:
        remote - remote node type
        Returns:
        local node type adapter
      • getItemDef

        public ItemDefinition getItemDef​(RemoteItemDefinition remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientItemDefinition instance. Factory method for creating a local adapter for a remote item definition. Note that before calling this method, the client may want to introspect the remote item definition to determine whether to use the getNodeDef or getPropertyDef method instead, as the adapter returned by this method will only cover the ItemDef base interface.
        Specified by:
        getItemDef in interface LocalAdapterFactory
        Parameters:
        remote - remote item definition
        Returns:
        local item definition adapter
      • getNodeDef

        public NodeDefinition getNodeDef​(RemoteNodeDefinition remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientNodeDefinition instance. Factory method for creating a local adapter for a remote node definition.
        Specified by:
        getNodeDef in interface LocalAdapterFactory
        Parameters:
        remote - remote node definition
        Returns:
        local node definition adapter
      • getLock

        public Lock getLock​(Session session,
                            RemoteLock remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientLock instance. Factory method for creating a local adapter for a remote lock.
        Specified by:
        getLock in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote lock
        Returns:
        local lock adapter
      • getQueryManager

        public QueryManager getQueryManager​(Session session,
                                            RemoteQueryManager remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientQueryManager instance. Factory method for creating a local adapter for a remote query manager.
        Specified by:
        getQueryManager in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote query manager
        Returns:
        local query manager adapter
      • getQuery

        public Query getQuery​(Session session,
                              RemoteQuery remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientQuery instance. Factory method for creating a local adapter for a remote query.
        Specified by:
        getQuery in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote query
        Returns:
        local query adapter
      • getQueryResult

        public QueryResult getQueryResult​(Session session,
                                          RemoteQueryResult remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientQueryResult instance. Factory method for creating a local adapter for a remote query result.
        Specified by:
        getQueryResult in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote query result
        Returns:
        local query result adapter
      • getRow

        public Row getRow​(Session session,
                          RemoteRow remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientRow instance. Factory method for creating a local adapter for a remote query row.
        Specified by:
        getRow in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote query row
        Returns:
        local query row adapter
      • getNodeIterator

        public NodeIterator getNodeIterator​(Session session,
                                            RemoteIterator remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientNodeIterator instance. Factory method for creating a local adapter for a remote node iterator.
        Specified by:
        getNodeIterator in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote node iterator
        Returns:
        local node iterator adapter
      • getPropertyIterator

        public PropertyIterator getPropertyIterator​(Session session,
                                                    RemoteIterator remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientPropertyIterator instance. Factory method for creating a local adapter for a remote property iterator.
        Specified by:
        getPropertyIterator in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote property iterator
        Returns:
        local property iterator adapter
      • getVersionIterator

        public VersionIterator getVersionIterator​(Session session,
                                                  RemoteIterator remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientVersionIterator instance. Factory method for creating a local adapter for a remote version iterator.
        Specified by:
        getVersionIterator in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote version iterator
        Returns:
        local version iterator adapter
      • getNodeTypeIterator

        public NodeTypeIterator getNodeTypeIterator​(RemoteIterator remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientNodeTypeIterator instance. Factory method for creating a local adapter for a remote node type iterator.
        Specified by:
        getNodeTypeIterator in interface LocalAdapterFactory
        Parameters:
        remote - remote node type iterator
        Returns:
        local node type iterator adapter
      • getRowIterator

        public RowIterator getRowIterator​(Session session,
                                          RemoteIterator remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates and returns a ClientRowIterator instance. Factory method for creating a local adapter for a remote row iterator.
        Specified by:
        getRowIterator in interface LocalAdapterFactory
        Parameters:
        session - current session
        remote - remote row iterator
        Returns:
        local row iterator adapter
      • getAccessControlManager

        public AccessControlManager getAccessControlManager​(RemoteAccessControlManager remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Factory method for creating a local adapter for a remote access control manager
        Specified by:
        getAccessControlManager in interface LocalAdapterFactory
        Parameters:
        remote - remote access control manager
        Returns:
        local access control manager
      • getAccessControlPolicy

        public AccessControlPolicy getAccessControlPolicy​(RemoteAccessControlPolicy remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Factory method for creating a local adapter for a remote access control policy
        Specified by:
        getAccessControlPolicy in interface LocalAdapterFactory
        Parameters:
        remote - remote access control policy
        Returns:
        local access control policy
      • getAccessControlPolicy

        public AccessControlPolicy[] getAccessControlPolicy​(RemoteAccessControlPolicy[] remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Factory method for creating an array of local adapter for an array of remote access control policies
        Specified by:
        getAccessControlPolicy in interface LocalAdapterFactory
        Parameters:
        remote - array of remote access control policies
        Returns:
        array of local access control policies
      • getAccessControlPolicyIterator

        public AccessControlPolicyIterator getAccessControlPolicyIterator​(RemoteIterator remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Factory method for creating a local adapter for a remote access control policy iterator
        Specified by:
        getAccessControlPolicyIterator in interface LocalAdapterFactory
        Parameters:
        remote - access control policy iterator
        Returns:
        local access control policy iterator
      • getAccessControlEntry

        public AccessControlEntry getAccessControlEntry​(RemoteAccessControlEntry remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Factory method for creating a local adapter for a remote access control entry
        Specified by:
        getAccessControlEntry in interface LocalAdapterFactory
        Parameters:
        remote - remote access control entry
        Returns:
        local access control entry
      • getAccessControlEntry

        public AccessControlEntry[] getAccessControlEntry​(RemoteAccessControlEntry[] remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Factory method for creating an array of local adapter for an array of remote access control entry
        Specified by:
        getAccessControlEntry in interface LocalAdapterFactory
        Parameters:
        remote - array of remote access control entry
        Returns:
        local array of access control entry
      • getPrincipal

        public Principal getPrincipal​(RemotePrincipal remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Factory method for creating a local adapter for a remote principal.

        If remote is a RemoteGroup the principal returned implements the org.apache.jackrabbit.api.security.principal.GroupPrincipal interface.

        Specified by:
        getPrincipal in interface LocalAdapterFactory
        Parameters:
        remote - principal
        Returns:
        local principal
      • getPrincipalIterator

        public Iterator<Principal> getPrincipalIterator​(RemoteIterator remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Factory method for creating a local adapter for a remote principal iterator.

        Each entry in the remote iterator which is a RemoteGroup will be provided as a principal implementing the org.apache.jackrabbit.api.security.principal.GroupPrincipal interface.

        Specified by:
        getPrincipalIterator in interface LocalAdapterFactory
        Parameters:
        remote - remote principal iterator
        Returns:
        local principal iterator
      • getPrivilege

        public Privilege getPrivilege​(RemotePrivilege remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Factory method for creating a local adapter for a remote privilege
        Specified by:
        getPrivilege in interface LocalAdapterFactory
        Parameters:
        remote - remote privilege
        Returns:
        local privilege
      • getPrivilege

        public Privilege[] getPrivilege​(RemotePrivilege[] remote)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Factory method for creating an array of local adapter for an array of remote privilege
        Specified by:
        getPrivilege in interface LocalAdapterFactory
        Parameters:
        remote - array of remote privilege
        Returns:
        array of local privilege