Class ServerObject

    • Constructor Detail

      • ServerObject

        protected ServerObject​(RemoteAdapterFactory factory)
                        throws RemoteException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Creates a basic server adapter that uses the given factory to create new adapters.
        Parameters:
        factory - remote adapter factory
        Throws:
        RemoteException - on RMI errors
    • Method Detail

      • getFactory

        protected RemoteAdapterFactory getFactory()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns the remote adapter factory used to create new adapters.
        Returns:
        remote adapter factory
      • getRepositoryException

        protected RepositoryException getRepositoryException​(RepositoryException ex)
        Deprecated, for removal: This API element is subject to removal in a future version.
        Returns a cleaned version of the given exception. In some cases the underlying repository implementation may throw exceptions that are either unserializable, use exception subclasses that are only locally available, contain references to unserializable or only locally available classes. This method returns a cleaned version of such an exception. The returned exception contains only the message string from the original exception, and uses the public JCR exception class that most specifically matches the original exception.
        Parameters:
        ex - the original exception
        Returns:
        clean exception
      • getRemoteItem

        protected RemoteItem getRemoteItem​(Item item)
                                    throws RemoteException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility method for creating a remote reference for a local item. Unlike the factory method for creating remote item references, this method introspects the type of the local item and returns the corresponding node, property, or item remote reference using the remote adapter factory.

        If the item, this method calls the getRemoteNode(Node) to return the correct remote type.

        Parameters:
        item - local node, property, or item
        Returns:
        remote node, property, or item reference
        Throws:
        RemoteException - on RMI errors
      • getRemoteNode

        protected RemoteNode getRemoteNode​(Node node)
                                    throws RemoteException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility method for creating a remote reference for a local node. Unlike the factory method for creating remote node references, this method introspects the type of the local node and returns the corresponding node, version, or version history remote reference using the remote adapter factory.
        Parameters:
        node - local version, versionhistory, or normal node
        Returns:
        remote node, property, or item reference
        Throws:
        RemoteException - on RMI errors
      • getRemoteNodeTypeArray

        protected RemoteNodeType[] getRemoteNodeTypeArray​(NodeType[] types)
                                                   throws RemoteException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility method for creating an array of remote references for local node types. The remote references are created using the remote adapter factory.

        A null input is treated as an empty array.

        Parameters:
        types - local node type array
        Returns:
        remote node type array
        Throws:
        RemoteException - on RMI errors
      • getSerialValues

        protected Value[] getSerialValues​(Value[] values)
                                   throws RepositoryException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility method for preparing an array of values for serialization. The returned array will contain serializable versions of all the given values.

        If the given array is null, then an empty array is returned.

        Parameters:
        values - the values to be decorated
        Returns:
        array of decorated values
        Throws:
        RepositoryException - if the values can not be serialized
      • getSerialValue

        protected Value getSerialValue​(Value value)
                                throws RepositoryException
        Deprecated, for removal: This API element is subject to removal in a future version.
        Utility method for decorating a value. Note that the contents of the original values will only be copied when the decorators are serialized. Null referenced and already serializable values are passed as-is.
        Parameters:
        value - the value to be decorated, or null
        Returns:
        the decorated value, or null
        Throws:
        RepositoryException - if the value can not be serialized