package rose;

import com.linar.jintegra.*;
/**
 * Proxy for COM Interface 'IRoseContextMenuItem'. 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 IRoseContextMenuItemProxy extends com.linar.jintegra.Dispatch implements IRoseContextMenuItem, java.io.Serializable {

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

  static { JIntegraInit.init(); }

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

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

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

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

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

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

  protected IRoseContextMenuItemProxy(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);
    }
  }

  /**
   * getCaption. 
   *
   * @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 getCaption  () throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {};
    return invoke("getCaption", 12682, 2, parameters).getBSTR();
  }

  /**
   * setCaption. 
   *
   * @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 setCaption  (
              String rhs) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("rhs", 8, rhs),};
    invoke("setCaption", 12682, 4, parameters);
    return;
  }

  /**
   * getInternalName. 
   *
   * @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 getInternalName  () throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {};
    return invoke("getInternalName", 12683, 2, parameters).getBSTR();
  }

  /**
   * setInternalName. 
   *
   * @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 setInternalName  (
              String rhs) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("rhs", 8, rhs),};
    invoke("setInternalName", 12683, 4, parameters);
    return;
  }

  /**
   * getMenuID. 
   *
   * @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 getMenuID  () throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {};
    return invoke("getMenuID", 12686, 2, parameters).getI2();
  }

  /**
   * setMenuID. 
   *
   * @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 setMenuID  (
              short rhs) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("rhs", 2, rhs),};
    invoke("setMenuID", 12686, 4, parameters);
    return;
  }

  /**
   * getMenuState. 
   *
   * @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 getMenuState  () throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {};
    return invoke("getMenuState", 12687, 2, parameters).getI2();
  }

  /**
   * setMenuState. 
   *
   * @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 setMenuState  (
              short rhs) throws java.io.IOException, com.linar.jintegra.AutomationException{
    com.linar.jintegra.Variant[] parameters = {new Variant("rhs", 2, rhs),};
    invoke("setMenuState", 12687, 4, parameters);
    return;
  }

  /**
   * 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();
  }

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

  static {
    com.linar.jintegra.InterfaceDesc.add("ee0b16e0-ff91-11d1-9fad-0060975306fe", IRoseContextMenuItemProxy.class, null, 0, null );
  }
}
