package rose;

import com.linar.jintegra.*;
/**
 * Proxy for COM Interface 'IRoseExternalDocument'. Generated 31/01/2002 11:44:13 AM
 * from 'C:|Program Files|Rational|Rose|rationalrose.tlb'<P>
 * Generated using version 1.5 of <B>J-Integra[tm]</B> -- pure Java/COM integration technology from Intrinsyc Software Inc.
 * See  <A HREF="http://www.intrinsyc.com/">http://www.intrinsyc.com/</A><P>
 *
 * Generator Options:
 * PromptForTypeLibraries = False
 * AttemptNonDual = True
 * ClashPrefix = zz_
 * LowerCaseMemberNames = True
 * IDispatchOnly = False
 * RetryOnReject = False
 * AwtForOcxs = False
 * GenerateDeprecatedConstructors = True
 * ArraysAsObjects = False
 * DontGenerateDisp = False
 * DontRenameSameMethods = False
 * IgnoreConflictingInterfaces = True
 * MakeSerializable = True
 */
public class IRoseExternalDocumentProxy extends com.linar.jintegra.Dispatch implements IRoseExternalDocument, java.io.Serializable {

  protected String getJintegraVersion() { return "1.5"; }

  static { JIntegraInit.init(); }

  public static final Class targetClass = rose.IRoseExternalDocument.class;

  public IRoseExternalDocumentProxy(String CLSID, String host, AuthInfo authInfo) throws java.net.UnknownHostException, java.io.IOException{
    super(CLSID, IRoseExternalDocument.IID, host, authInfo);
  }

  /** For internal use only */
  public IRoseExternalDocumentProxy() {}

  public IRoseExternalDocumentProxy(Object obj) throws java.io.IOException {
    super(obj, IRoseExternalDocument.IID);
  }

  protected IRoseExternalDocumentProxy(Object obj, String iid) throws java.io.IOException {
    super(obj, iid);
  }

  public IRoseExternalDocumentProxy(String CLSID, String host, boolean deferred) throws java.net.UnknownHostException, java.io.IOException{
    super(CLSID, IRoseExternalDocument.IID, host, null);
  }

  protected IRoseExternalDocumentProxy(String CLSID, String iid, String host, AuthInfo authInfo) throws java.io.IOException {
    super(CLSID, iid, host, authInfo);
  }

  public void addListener(String iidStr, Object theListener, Object theSource) throws java.io.IOException {
    super.addListener(iidStr, theListener, theSource);
  }

  public void removeListener(String iidStr, Object theListener) throws java.io.IOException {
    super.removeListener(iidStr, theListener);
  }

  /**
   * getPropertyByName. Get the value of a property dynamically at run-time, based on its name
   *
   * @return    return value.  The value of the property.
   * @param     name. The name of the property to get.
   * @exception java.lang.NoSuchFieldException If the property does not exit.
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public Object getPropertyByName(String name) throws NoSuchFieldException, java.io.IOException, com.linar.jintegra.AutomationException {
    com.linar.jintegra.Variant parameters[] = {};
    return super.invoke(name, super.getDispatchIdOfName(name), 2, parameters).getVARIANT();
  }

  /**
   * getPropertyByName. Get the value of a property dynamically at run-time, based on its name and a parameter value
   *
   * @return    return value.  The value of the property.
   * @param     name. The name of the property to get.
   * @param     rhs. Parameter used when getting the property.
   * @exception java.lang.NoSuchFieldException If the property does not exit.
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public Object getPropertyByName(String name, Object rhs) throws NoSuchFieldException, java.io.IOException, com.linar.jintegra.AutomationException {
    com.linar.jintegra.Variant parameters[] = {rhs == null ? new Variant("rhs", 10, 0x80020004L) : new Variant("rhs", 12, rhs)};
    return super.invoke(name, super.getDispatchIdOfName(name), 2, parameters).getVARIANT();
  }

  /**
   * invokeMethodByName. Invoke a method dynamically at run-time
   *
   * @return    return value.  The value returned by the method (null if none).
   * @param     name. The name of the method to be invoked
   * @param     parameters.  One element for each parameter.  Use primitive type wrappers
   *            to pass primitive types (eg Integer to pass an int).
   * @exception java.lang.NoSuchMethodException If the method does not exit.
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public Object invokeMethodByName(String name, Object[] parameters) throws NoSuchMethodException, java.io.IOException, com.linar.jintegra.AutomationException {
    com.linar.jintegra.Variant variantParameters[] = new com.linar.jintegra.Variant[parameters.length];
    for(int i = 0; i < parameters.length; i++) {
      variantParameters[i] = parameters[i] == null ? new Variant("p" + i, 10, 0x80020004L) :
	                                                   new Variant("p" + i, 12, parameters[i]);
    }
    try {
      return super.invoke(name, super.getDispatchIdOfName(name), 1, variantParameters).getVARIANT();
    } catch(NoSuchFieldException nsfe) {
      throw new NoSuchMethodException("There is no method called " + name);
    }
  }

  /**
   * getPath. 
   *
   * @return    return value.  The return value
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public String getPath  () throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {};
    return invoke("getPath", 1, 2, parameters).getBSTR();
  }

  /**
   * setPath. 
   *
   * @param     rhs The rhs)
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public void setPath  (
              String rhs) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("rhs", 8, rhs),};
    invoke("setPath", 1, 4, parameters);
    return;
  }

  /**
   * getURL. 
   *
   * @return    return value.  The return value
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public String getURL  () throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {};
    return invoke("getURL", 2, 2, parameters).getBSTR();
  }

  /**
   * setURL. 
   *
   * @param     rhs The rhs)
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public void setURL  (
              String rhs) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("rhs", 8, rhs),};
    invoke("setURL", 2, 4, parameters);
    return;
  }

  /**
   * getParentCategory. 
   *
   * @return    return value.  An reference to a IRoseCategory
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public IRoseCategory getParentCategory  () throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {};
    Object res = invoke("getParentCategory", 3, 2, parameters).getDISPATCH();
    return res == null ? null : new IRoseCategoryProxy(res);
  }

  /**
   * setParentCategory. 
   *
   * @param     rhs An reference to a IRoseCategory)
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public void setParentCategory  (
              IRoseCategory rhs) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("rhs", 9, rhs),};
    invoke("setParentCategory", 3, 4, parameters);
    return;
  }

  /**
   * getParentItem. 
   *
   * @return    return value.  An reference to a IRoseItem
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public IRoseItem getParentItem  () throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {};
    Object res = invoke("getParentItem", 12810, 2, parameters).getDISPATCH();
    return res == null ? null : new IRoseItemProxy(res);
  }

  /**
   * setParentItem. 
   *
   * @param     rhs An reference to a IRoseItem)
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public void setParentItem  (
              IRoseItem rhs) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("rhs", 9, rhs),};
    invoke("setParentItem", 12810, 4, parameters);
    return;
  }

  /**
   * getParentDiagram. 
   *
   * @return    return value.  An reference to a IRoseDiagram
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public IRoseDiagram getParentDiagram  () throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {};
    Object res = invoke("getParentDiagram", 12811, 2, parameters).getDISPATCH();
    return res == null ? null : new IRoseDiagramProxy(res);
  }

  /**
   * setParentDiagram. 
   *
   * @param     rhs An reference to a IRoseDiagram)
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public void setParentDiagram  (
              IRoseDiagram rhs) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("rhs", 9, rhs),};
    invoke("setParentDiagram", 12811, 4, parameters);
    return;
  }

  /**
   * isURL. 
   *
   * @return    return value.  The return value
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public boolean isURL  () throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {};
    return invoke("isURL", 4, 1, parameters).getBOOL();
  }

  /**
   * open. 
   *
   * @param     szAppPath The szAppPath (in)
   * @return    return value.  The return value
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public boolean open  (
              String szAppPath) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("szAppPath", 8, szAppPath),};
    return invoke("open", 5, 1, parameters).getBOOL();
  }

  /**
   * identifyClass. 
   *
   * @return    return value.  The return value
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public String identifyClass  () throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {};
    return invoke("identifyClass", 12668, 1, parameters).getBSTR();
  }

  /**
   * isClass. 
   *
   * @param     theClassName The theClassName (in)
   * @return    return value.  The return value
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public boolean isClass  (
              String theClassName) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("theClassName", 8, theClassName),};
    return invoke("isClass", 12669, 1, parameters).getBOOL();
  }

  /**
   * renderIconToClipboard. 
   *
   * @return    return value.  The return value
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public boolean renderIconToClipboard  () throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {};
    return invoke("renderIconToClipboard", 12820, 1, parameters).getBOOL();
  }

  /**
   * getIconIndex. 
   *
   * @return    return value.  The return value
   * @exception java.io.IOException If there are communications problems.
   * @exception com.linar.jintegra.AutomationException If the remote server throws an exception.
   */
  public short getIconIndex  () throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {};
    return invoke("getIconIndex", 12824, 1, parameters).getI2();
  }

  /** Dummy reference from interface to proxy to make sure proxy gets compiled */
  static final int xxDummy = 0;

  static {
    com.linar.jintegra.InterfaceDesc.add("906ff583-276b-11d0-8980-00a024774419", IRoseExternalDocumentProxy.class, null, 0, null );
  }
}
