private void navigateToUrl(String url) throws JIException { //ieObjectDispatch.put("Top",new JIVariant(new Integer(600))); //ieObjectDispatch.put("Left",new JIVariant(new Integer(700))); ieObjectDispatch.callMethod("Navigate2",new Object[]{new JIString(url),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM()}); }
private void navigateToUrl(String url) throws JIException { //ieObjectDispatch.put("Top",new JIVariant(new Integer(600))); //ieObjectDispatch.put("Left",new JIVariant(new Integer(700))); ieObjectDispatch.callMethod("Navigate2",new Object[]{new JIString(url),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM()}); }
private Object marshal(Object v, Class<?> declaredType) throws JIException { if(v==null) return JIVariant.OPTIONAL_PARAM(); Class<?> actualType = v.getClass(); if(actualType==String.class) return new JIString((String)v); return v; }
public void goto_Numbered_Slide ( final IJIDispatch view, final int index ) throws JIException { view.callMethod ( "GotoSlide", new Object[] { new Integer ( index ), JIVariant.OPTIONAL_PARAM () } ); }
public void savePresentationAs(IJIDispatch presentation, String fullEscapedPath) throws JIException { presentation.callMethod("SaveAs", new Object[]{new JIString(fullEscapedPath).Variant,JIVariant.OPTIONAL_PARAM(),new Integer(-1)}); }
public void savePresentationAs(IJIDispatch presentation, String fullEscapedPath) throws JIException { presentation.callMethod("SaveAs", new Object[]{new JIString(fullEscapedPath).Variant,JIVariant.OPTIONAL_PARAM(),new Integer(-1)}); }
/** * @throws JIException */ private void quitAndDestroy() throws JIException { System.out.println("Quit..."); dispatch.callMethod("Quit", new Object[] { new JIVariant(-1, true), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM() }); JISession.destroySession(dispatch.getAssociatedSession()); }
/** * @throws JIException */ private void quitAndDestroy () throws JIException { System.out.println ( "Quit..." ); this.dispatch.callMethod ( "Quit", new Object[] { new JIVariant ( -1, true ), JIVariant.OPTIONAL_PARAM (), JIVariant.OPTIONAL_PARAM () } ); JISession.destroySession ( this.dispatch.getAssociatedSession () ); }
/** * @throws JIException */ private void quitAndDestroy() throws JIException { System.out.println("Quit..."); dispatch.callMethod("Quit", new Object[] { new JIVariant(-1, true), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM() }); JISession.destroySession(dispatch.getAssociatedSession()); }
/** {@inheritDoc} */ @Override public OnmsWbemObjectSet performExecQuery (final String strQuery, final String strQueryLanguage, final Integer flags) throws WmiException { try { final JIVariant[] results = m_WbemServices.callMethodA("ExecQuery", new Object[]{new JIString(strQuery), JIVariant.OPTIONAL_PARAM(), JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM()}); final IJIDispatch wOSd = (IJIDispatch)JIObjectFactory.narrowObject((results[0]).getObjectAsComObject()); return new OnmsWbemObjectSetImpl(wOSd); } catch(final JIException e) { throw new WmiException("Failed to execute query '" + strQuery + "': " + e.getMessage(), e); } }
public IJIDispatch openPresentation(String fullEscapedPath) throws JIException, InterruptedException { IJIDispatch presentations = (IJIDispatch)JIObjectFactory.narrowObject(dispatch.get("Presentations").getObjectAsComObject()); JIVariant[] result = presentations.callMethodA("Open",new Object[]{new JIString(fullEscapedPath),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM()}); return (IJIDispatch)JIObjectFactory.narrowObject(result[0].getObjectAsComObject()); }
public IJIDispatch openPresentation ( final String fullEscapedPath ) throws JIException, InterruptedException { final IJIDispatch presentations = (IJIDispatch)JIObjectFactory.narrowObject ( this.dispatch.get ( "Presentations" ).getObjectAsComObject () ); final JIVariant[] result = presentations.callMethodA ( "Open", new Object[] { new JIString ( fullEscapedPath ), JIVariant.OPTIONAL_PARAM (), JIVariant.OPTIONAL_PARAM (), JIVariant.OPTIONAL_PARAM () } ); return (IJIDispatch)JIObjectFactory.narrowObject ( result[0].getObjectAsComObject () ); }
public IJIDispatch openPresentation(String fullEscapedPath) throws JIException, InterruptedException { IJIDispatch presentations = (IJIDispatch)JIObjectFactory.narrowObject(dispatch.get("Presentations").getObjectAsComObject()); JIVariant[] result = presentations.callMethodA("Open",new Object[]{new JIString(fullEscapedPath),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM()}); return (IJIDispatch)JIObjectFactory.narrowObject(result[0].getObjectAsComObject()); }
public void createWorkSheet () throws JIException { final int dispId = this.dispatch.getIDsOfNames ( "Workbooks" ); JIVariant outVal = this.dispatch.get ( dispId ); final IJIDispatch dispatchOfWorkBooks = (IJIDispatch)JIObjectFactory.narrowObject ( outVal.getObjectAsComObject () ); JIVariant[] outVal2 = dispatchOfWorkBooks.callMethodA ( "Add", new Object[] { JIVariant.OPTIONAL_PARAM () } ); this.dispatchOfWorkBook = (IJIDispatch)JIObjectFactory.narrowObject ( outVal2[0].getObjectAsComObject () ); outVal = this.dispatchOfWorkBook.get ( "Worksheets" ); this.dispatchOfWorkSheets = (IJIDispatch)JIObjectFactory.narrowObject ( outVal.getObjectAsComObject () ); outVal2 = this.dispatchOfWorkSheets.callMethodA ( "Add", new Object[] { JIVariant.OPTIONAL_PARAM (), JIVariant.OPTIONAL_PARAM (), JIVariant.OPTIONAL_PARAM (), JIVariant.OPTIONAL_PARAM () } ); this.dispatchOfWorkSheet = (IJIDispatch)JIObjectFactory.narrowObject ( outVal2[0].getObjectAsComObject () ); }
public void createWorkSheet() throws JIException { int dispId = dispatch.getIDsOfNames("Workbooks"); JIVariant outVal = dispatch.get(dispId); IJIDispatch dispatchOfWorkBooks =(IJIDispatch)JIObjectFactory.narrowObject(outVal.getObjectAsComObject()); JIVariant[] outVal2 = dispatchOfWorkBooks.callMethodA("Add",new Object[]{JIVariant.OPTIONAL_PARAM()}); dispatchOfWorkBook =(IJIDispatch)JIObjectFactory.narrowObject(outVal2[0].getObjectAsComObject()); outVal = dispatchOfWorkBook.get("Worksheets"); dispatchOfWorkSheets = (IJIDispatch)JIObjectFactory.narrowObject(outVal.getObjectAsComObject()); outVal2 = dispatchOfWorkSheets.callMethodA("Add",new Object[]{JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM()}); dispatchOfWorkSheet =(IJIDispatch)JIObjectFactory.narrowObject(outVal2[0].getObjectAsComObject()); }
public void createWorkSheet() throws JIException { int dispId = dispatch.getIDsOfNames("Workbooks"); JIVariant outVal = dispatch.get(dispId); IJIDispatch dispatchOfWorkBooks =(IJIDispatch)JIObjectFactory.narrowObject(outVal.getObjectAsComObject()); JIVariant[] outVal2 = dispatchOfWorkBooks.callMethodA("Add",new Object[]{JIVariant.OPTIONAL_PARAM()}); dispatchOfWorkBook =(IJIDispatch)JIObjectFactory.narrowObject(outVal2[0].getObjectAsComObject()); outVal = dispatchOfWorkBook.get("Worksheets"); dispatchOfWorkSheets = (IJIDispatch)JIObjectFactory.narrowObject(outVal.getObjectAsComObject()); outVal2 = dispatchOfWorkSheets.callMethodA("Add",new Object[]{JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM()}); dispatchOfWorkSheet =(IJIDispatch)JIObjectFactory.narrowObject(outVal2[0].getObjectAsComObject()); }
public void createWorkSheet() throws JIException { int dispId = dispatch.getIDsOfNames("Workbooks"); JIVariant outVal = dispatch.get(dispId); IJIDispatch dispatchOfWorkBooks =(IJIDispatch)JIObjectFactory.narrowObject(outVal.getObjectAsComObject()); JIVariant[] outVal2 = dispatchOfWorkBooks.callMethodA("Add",new Object[]{JIVariant.OPTIONAL_PARAM()}); dispatchOfWorkBook =(IJIDispatch)JIObjectFactory.narrowObject(outVal2[0].getObjectAsComObject()); outVal = dispatchOfWorkBook.get("Worksheets"); dispatchOfWorkSheets = (IJIDispatch)JIObjectFactory.narrowObject(outVal.getObjectAsComObject()); outVal2 = dispatchOfWorkSheets.callMethodA("Add",new Object[]{JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM()}); dispatchOfWorkSheet =(IJIDispatch)JIObjectFactory.narrowObject(outVal2[0].getObjectAsComObject()); }
public void createWorkSheet() throws JIException { int dispId = dispatch.getIDsOfNames("Workbooks"); JIVariant outVal = dispatch.get(dispId); IJIDispatch dispatchOfWorkBooks =(IJIDispatch)JIObjectFactory.narrowObject(outVal.getObjectAsComObject()); JIVariant[] outVal2 = dispatchOfWorkBooks.callMethodA("Add",new Object[]{JIVariant.OPTIONAL_PARAM()}); dispatchOfWorkBook =(IJIDispatch)JIObjectFactory.narrowObject(outVal2[0].getObjectAsComObject()); outVal = dispatchOfWorkBook.get("Worksheets"); dispatchOfWorkSheets = (IJIDispatch)JIObjectFactory.narrowObject(outVal.getObjectAsComObject()); outVal2 = dispatchOfWorkSheets.callMethodA("Add",new Object[]{JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM(),JIVariant.OPTIONAL_PARAM()}); dispatchOfWorkSheet =(IJIDispatch)JIObjectFactory.narrowObject(outVal2[0].getObjectAsComObject()); }
/** {@inheritDoc} */ @Override public OnmsWbemObjectSet performInstanceOf(final String wmiClass) throws WmiException { try { // Execute the InstancesOf method on the remote SWbemServices object. final JIVariant[] results = m_WbemServices.callMethodA("InstancesOf", new Object[]{new JIString(wmiClass), 0, JIVariant.OPTIONAL_PARAM()}); final IJIDispatch wOSd = (IJIDispatch) JIObjectFactory.narrowObject((results[0]).getObjectAsComObject()); return new OnmsWbemObjectSetImpl(wOSd); } catch (final JIException e) { throw new WmiException("Failed to perform WMI operation (\\\\" + wmiClass + ") : " + e.getMessage(), e); } }
/** {@inheritDoc} */ @Override public OnmsWbemObjectSet performInstanceOf(final String wmiClass) throws WmiException { try { // Execute the InstancesOf method on the remote SWbemServices object. final JIVariant[] results = m_WbemServices.callMethodA("InstancesOf", new Object[]{new JIString(wmiClass), 0, JIVariant.OPTIONAL_PARAM()}); final IJIDispatch wOSd = (IJIDispatch) JIObjectFactory.narrowObject((results[0]).getObjectAsComObject()); return new OnmsWbemObjectSetImpl(wOSd); } catch (final JIException e) { throw new WmiException("Failed to perform WMI operation (\\\\" + wmiClass + ") : " + e.getMessage(), e); } }