getinfostatus.java

来自「CmisJavaApi」· Java 代码 · 共 95 行

JAVA
95
字号
/* * 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 *///---------------------------------------------------------------------------////  CVS Info//---------------------------------------------------------------------------//////  $Id: GetInfoStatus.java,v 1.2 2000/09/05 13:30:44 festor Exp $//  $Source: /local/resedas/CVS-Repository/CmisJavaApi/src/fr/dyade/cmis/api/types/GetInfoStatus.java,v $//---------------------------------------------------------------------------////  Todo//---------------------------------------------------------------------------//// This class is badly designed.... insert coin and code again !!!// GetInfoStatus and setInfoClass could have much more in common. Try to push more stuff// at the InfoStatus level.package fr.dyade.cmis.api.types;public class GetInfoStatus  extends InfoStatus {      public final static short ATTRIBUTEID_ERROR = 0;      public final static short ATTRIBUTE = 1;      /** Create a new error status for an attribute 	*/      public GetInfoStatus(AttributeIdError pAEID) {	 fT=ATTRIBUTEID_ERROR;	 fAttributeIdError=pAEID;      }      /** Create a new correct status fr an attribute	*/      public GetInfoStatus(Attribute pAttribute) {	 fT=ATTRIBUTE;	 fAttribute=pAttribute;      }      /** Basic constructor.	* Dedicated to C level mappers responsible for filling	* the object in a correct way.	*/      private GetInfoStatus(){}      /**	*  Returns the AttributeIdError of the instance, in case of "ATTRIBUTEID_ERROR".	*  @return AttributeIdError 	*/      public final AttributeIdError getAttributeIdError() {	 return fAttributeIdError;      }            /**	*  Returns the Attribute of the instance. This is only available in case of "ATTRIBUTE" error.	*  @return Attribute corresponding to "ATTRIBUTE" error.	*/      public final Attribute  getAttribute(){	 return fAttribute;      }            /**	*  Returns a <code>String</code> representation of the <code>GetInfoStatus</code>	*  This method provides an easy way to print debug informations.	*  @return <code>String</code> representation of the <code>GetInfoStatus</code>	*/      public String toString(){	 String res;	 	 if (fT == ATTRIBUTEID_ERROR){	    res = "ATTRIBUTEID_ERROR:" + fAttributeIdError.toString();	 }	 else res = "ATTRIBUTE:" + fAttribute.toString();	 return res;      }            private AttributeIdError fAttributeIdError;}

⌨️ 快捷键说明

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