⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 remotenode.java

📁 jsr170接口的java实现。是个apache的开源项目。
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.  See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License.  You may obtain a copy of the License at * *      http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */package org.apache.jackrabbit.rmi.remote;import java.rmi.RemoteException;import javax.jcr.RepositoryException;import javax.jcr.Value;/** * Remote version of the JCR {@link javax.jcr.Node Node} interface. * Used by the {@link org.apache.jackrabbit.rmi.server.ServerNode ServerNode} * and {@link org.apache.jackrabbit.rmi.client.ClientNode ClientNode} * adapters to provide transparent RMI access to remote nodes. * <p> * The methods in this interface are documented only with a reference * to a corresponding Node method. The remote object will simply forward * the method call to the underlying Node instance. Argument and return * values, as well as possible exceptions, are copied over the network. * Compex return values (like Nodes and Properties) are returned as remote * references to the corresponding remote interfaces. Iterator values * are transmitted as object arrays. RMI errors are signalled with * RemoteExceptions. * <p> * Note that only two generic setProperty methods are included in this * interface. Clients should implement the type-specific setProperty * methods by wrapping the argument values into generic Value objects * and calling the generic setProperty methods. Note also that the * Value objects must be serializable and implemented using classes * available on both the client and server side. The * {@link org.apache.jackrabbit.rmi.value.SerialValueFactory SerialValueFactory} * class provides two convenience methods to satisfy these requirements. * * @author Jukka Zitting * @see javax.jcr.Node * @see org.apache.jackrabbit.rmi.client.ClientNode * @see org.apache.jackrabbit.rmi.server.ServerNode */public interface RemoteNode extends RemoteItem {    /**     * Remote version of the     * {@link javax.jcr.Node#addNode(String) Node.addNode(Sring)} method.     *     * @param path relative path     * @return new node     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    RemoteNode addNode(String path) throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#addNode(String,String) Node.addNode(String,String)}     * method.     *     * @param path relative path     * @param type node type name     * @return new node     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    RemoteNode addNode(String path, String type)            throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#getProperty(String) Node.getProperty(String)}     * method.     *     * @param path relative path     * @return node property     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    RemoteProperty getProperty(String path)            throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#getProperties() Node.getProperties()} method.     *     * @return node properties     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    RemoteIterator getProperties() throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#getProperties(String) Node.getProperties(String)}     * method.     *     * @param pattern property name pattern     * @return matching node properties     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    RemoteIterator getProperties(String pattern)            throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#getPrimaryItem() Node.getPrimaryItem()} method.     *     * @return primary item     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    RemoteItem getPrimaryItem() throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#getUUID() Node.getUUID()} method.     *     * @return node uuid     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    String getUUID() throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#getReferences() Node.getReferences()} method.     *     * @return reference properties     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    RemoteIterator getReferences() throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#getNodes() Node.getNodes()} method.     *     * @return child nodes     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    RemoteIterator getNodes() throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#getNodes(String) Node.getNodes(String)} method.     *     * @param pattern node name pattern     * @return matching child nodes     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    RemoteIterator getNodes(String pattern)            throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#hasNode(String) Node.hasNode(String)} method.     *     * @param path relative path     * @return <code>true</code> if the identified node exists,     *         <code>false</code> otherwise     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    boolean hasNode(String path) throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#hasProperty(String) Node.hasProperty()} method.     *     * @param path relative path     * @return <code>true</code> if the identified property exists,     *         <code>false</code> otherwise     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    boolean hasProperty(String path)            throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#hasNodes() Node.hasNodes()} method.     *     * @return <code>true</code> if this node has child nodes,     *         <code>false</code> otherwise     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    boolean hasNodes() throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#hasProperties() Node.hasProperties()} method.     *     * @return <code>true</code> if this node has properties,     *         <code>false</code> otherwise     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    boolean hasProperties() throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#getPrimaryNodeType() Node.getPrimaryNodeType()}     * method.     *     * @return primary node type     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    RemoteNodeType getPrimaryNodeType()            throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#getMixinNodeTypes() Node.getMixinNodeTypes()}     * method.     *     * @return mixin node types     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    RemoteNodeType[] getMixinNodeTypes()            throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#isNodeType(String) Node.isNodeType(String)} method.     *     * @param type node type name     * @return <code>true</code> if this node is an instance of the     *         identified type, <code>false</code> otherwise     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    boolean isNodeType(String type) throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#getNode(String) Node.getNode(String)} method.     *     * @param path relative path     * @return node     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    RemoteNode getNode(String path) throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#orderBefore(String,String) Node.orderBefore(String,String)}     * method.     *     * @param src source path     * @param dst destination path     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    void orderBefore(String src, String dst)            throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#setProperty(String,Value) Node.setProperty(String,Value)}     * method.     *     * @param name property name     * @param value property value     * @return property     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    RemoteProperty setProperty(String name, Value value)            throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#setProperty(String,Value,int) Node.setProperty(String,Value)}     * method.     *     * @param name property name     * @param value property value     * @param type property type     * @return property     * @throws RepositoryException on repository errors     * @throws RemoteException on RMI errors     */    RemoteProperty setProperty(String name, Value value, int type)            throws RepositoryException, RemoteException;    /**     * Remote version of the     * {@link javax.jcr.Node#setProperty(String,Value[]) Node.setProperty(String,Value[])}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -