cmisrequest.java
来自「CmisJavaApi」· Java 代码 · 共 146 行
JAVA
146 行
/* * The contents of this file are subject to the Dyade Public License, * as defined by the file DYADE_PUBLIC_LICENSE.TXT * * You may not use this file except in compliance with the License. You may * obtain a copy of the License on the Dyade web site (www.dyade.fr). * * Software distributed under the License is distributed on an "AS IS" basis, * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for * the specific terms governing rights and limitations under the License. * * The Original Code is CmisJava API, including the java package * fr.dyade.cmis, released September 5, 2000. * * The Initial Developer of the Original Code is Dyade. The Original Code and * portions created by Dyade are Copyright Bull and Copyright INRIA. * All Rights Reserved. *//* Copyright 1996-2000 by Institut National de Recherche en Informatique * et en Automatique (INRIA) * All rights reserved. See COPYRIGHT in top-level directory. * * Authors: Laurent Andrey, Eric Dillon, Olivier Festor */// $Id: CMISRequest.java,v 1.2 2000/09/05 13:04:31 festor Exp $// $Source: /local/resedas/CVS-Repository/CmisJavaApi/src/fr/dyade/cmis/api/operation/CMISRequest.java,v $//// Todo//package fr.dyade.cmis.api.operation;import java.util.Enumeration;import fr.dyade.cmis.api.CMISStack;import fr.dyade.cmis.api.CMISException;import fr.dyade.cmis.api.types.InvokeId;import fr.dyade.cmis.api.types.CMISError;import fr.dyade.cmis.api.operation.event.CMISEventSource;/** Basic interface a CMIS request must implement. * <p><bf>Remark:</bf> * The term "operation" is not so proper accordingly to X.710 standard. Indeed "operation " does not * include the <it>management operation service</it>. May be the word "service" should be use instead of * "operation". And so a <tt>CMISRequest</tt> instance (or any sub class instance) would be an occurrence of the * use of one CMIS management service. * </p> * * <p>TODO: the <code>complete</code> & <code>addConfirmation</code> method are implementation stuff they should be got rid of * this public interface declaration. But the <code>isCompleted()</code> and getReplies should be kept in this place. * * @see fr.dyade.cmis.api.operation.CreateRequest * @see fr.dyade.cmis.api.operation.DeleteRequest * @see fr.dyade.cmis.api.operation.ActionRequest * @see fr.dyade.cmis.api.operation.CancelGetRequest * @see fr.dyade.cmis.api.operation.EventReportRequest * @see fr.dyade.cmis.api.operation.GetRequest * @see fr.dyade.cmis.api.operation.SetRequest * @version cvs $Id: CMISRequest.java,v 1.2 2000/09/05 13:04:31 festor Exp $ */public interface CMISRequest extends CMISEventSource { /** * Set the invoke identifier for this CMISRequest * @param pIId The InvokeId object for the invoke identifier */ void setInvokeId(InvokeId pIid); /** * Get the invoke identifier of this CMISRequest * @result the InvokeId object of the CMISRequest */ InvokeId getInvokeId(); /** The communication stack this request goes through * @return the stack handling this request. */ CMISStack getStack(); /** Completion state of the operation. @return a boolean true if the last confirmation or a fatal error has been encountered. */ boolean isCompleted() ; /** Number of received replies. <menu> <li> <IMG SRC="images/warning.gif">The result of this method should not be used as a upper limit into the result of the <tt>getReplies</tt>. <li> <IMG SRC="images/interrogation-pt.gif"> Is this id useful ? </menu> @see CMISRequest#addConfirmation @see CMISRequest#getRepliesCount */ int getRepliesCount(); /** Get received replies. * @return A java enumeration of the replies (confirmations) the request has received * <p>NOTE: When calling <code>nextElement()</code> method of the return, * the user must use the proper cast ({@link ActionConfirmation}, * {@link CancelGetConfirmation}, {@link CreateConfirmation}, {@link DeleteConfirmation} * {@link EventReportConfirmation}, {@link GetConfirmation}, or {@link SetConfirmation} * accordingly to the actual type of the request. */ Enumeration getReplies(); /** Test if request has some error replies. */ boolean hasError(); /** First Error raised for an performing/performed operation. * @return - the first error in an error replies that request received, * or -null if no error are available. */ CMISError getError(); /** Sets the operation as completed. */ void complete(); /** Adds a confirmation to the operation. <p><IMG SRC="images/work.gif"> <menu> <li>Some extra exceptions should be had: <tt>AddOnCompletedOperation</tt>. </menu> */ void addConfirmation( CMISConfirmation pConfirmation ); /** Verification of operation request parameters. @returns true if all mandatory parameters (X710 meaning) are set and if all set parameters are valid. A true return means that the initial request can be started. This method is to implemented by actual operation (Get, Set, ...). Basic implementation for CMISRequest interface would probably left this method unimplemented. */ boolean isReqValid(); /** Actual start of the operation. This method is equivalent of a request service primitive followed by the indication and appropriated action on the agent. If the agent is multi-thread the operation will go in an asynchronous way. */ void doIt() throws CMISException; void waitForIdle();}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?