Package com.sun.star.lang

Examples of com.sun.star.lang.XInitialization


            XSecuritySAXEventKeeper.class, saxEventKeeperObj);
                         
                          /*
                           * initializes the SAXEventKeeper component with the XMLDocumentWrapper component.
                           */
        XInitialization xInitialization =
          (XInitialization)UnoRuntime.queryInterface(
            XInitialization.class, m_xSAXEventKeeper);
        Object args[]=new Object[1];
        args[0] = m_xXMLDocumentWrapper;
        xInitialization.initialize(args);
      }
      catch( com.sun.star.uno.Exception e)
      {
        e.printStackTrace();
      }
View Full Code Here


            XReferenceResolvedListener.class, signatureCreator);
                         
                          /*
                           * initializes the SignatureCreator.
                           */
        XInitialization xInitialization =
          (XInitialization)UnoRuntime.queryInterface(
            XInitialization.class, m_xReferenceResolvedListener);
         
        Object args[]=new Object[5];
        args[0] = new Integer(m_nSecurityId).toString();
        args[1] = m_xSAXEventKeeper;
        args[2] = new Integer(m_nSignatureElementCollectorId).toString();
        args[3] = m_xXMLSecurityContext.getSecurityEnvironment();
        args[4] = m_xXMLSignature;
        xInitialization.initialize(args);
       
        /*
         * creates a Blocker.
         */
        int blockerId = m_xSAXEventKeeper.addBlocker();
        m_xSAXEventKeeper.setSecurityId(blockerId, m_nSecurityId);
     
        XBlockerMonitor xBlockerMonitor = (XBlockerMonitor)UnoRuntime.queryInterface(
          XBlockerMonitor.class, m_xReferenceResolvedListener);
        xBlockerMonitor.setBlockerId(blockerId);
       
        /*
         * sets signature creation result listener.
         */
        XSignatureCreationResultBroadcaster xSignatureCreationResultBroadcaster =
          (XSignatureCreationResultBroadcaster)UnoRuntime.queryInterface(
            XSignatureCreationResultBroadcaster.class, m_xReferenceResolvedListener);
        xSignatureCreationResultBroadcaster.addSignatureCreationResultListener(
          (XSignatureCreationResultListener)UnoRuntime.queryInterface(
            XSignatureCreationResultListener.class, resultListener));
      }
      catch( com.sun.star.uno.Exception e)
      {
        e.printStackTrace();
      }
       
    }
    else
    {
      m_nSignatureElementCollectorId = m_xSAXEventKeeper.addSecurityElementCollector(
        ElementMarkPriority.BEFOREMODIFY, false);
       
      m_xSAXEventKeeper.setSecurityId(m_nSignatureElementCollectorId, m_nSecurityId);
     
      try
      {
        /*
         * creates a SignatureVerifier.
         */
        Object signatureVerifier = m_xRemoteServiceManager.createInstanceWithContext(
          TestTool.SIGNATUREVERIFIER_COMPONENT, m_xRemoteContext);
         
        m_xReferenceResolvedListener =
          (XReferenceResolvedListener)UnoRuntime.queryInterface(
            XReferenceResolvedListener.class, signatureVerifier);
           
                          /*
                           * initializes the SignatureVerifier.
                           */
        XInitialization xInitialization =
          (XInitialization)UnoRuntime.queryInterface(
            XInitialization.class, m_xReferenceResolvedListener);
        Object args[]=new Object[5];
        args[0] = new Integer(m_nSecurityId).toString();
        args[1] = m_xSAXEventKeeper;
        args[2] = new Integer(m_nSignatureElementCollectorId).toString();
        args[3] = m_xXMLSecurityContext;
        args[4] = m_xXMLSignature;
        xInitialization.initialize(args);
       
        /*
         * sets signature verify result listener.
         */
        XSignatureVerifyResultBroadcaster xSignatureVerifyResultBroadcaster =
View Full Code Here

            XReferenceResolvedListener.class, encryptor);
 
        /*
         * initializes the Encryptor.
         */
        XInitialization xInitialization =
          (XInitialization)UnoRuntime.queryInterface(
            XInitialization.class, m_xReferenceResolvedListener);
        Object args[]=new Object[5];
        args[0] = new Integer(m_nSecurityId).toString();
        args[1] = m_xSAXEventKeeper;
        args[2] = new Integer(m_nEncryptionElementCollectorId).toString();
        args[3] = m_xXMLSecurityContext.getSecurityEnvironment();
        args[4] = m_xXMLEncryption;
        xInitialization.initialize(args);
       
        /*
         * sets encryption result listener.
         */
        XEncryptionResultBroadcaster m_xEncryptionResultBroadcaster =
          (XEncryptionResultBroadcaster)UnoRuntime.queryInterface(
            XEncryptionResultBroadcaster.class, m_xReferenceResolvedListener);
        m_xEncryptionResultBroadcaster.addEncryptionResultListener(
          (XEncryptionResultListener)UnoRuntime.queryInterface(
            XEncryptionResultListener.class, resultListener));
      }
      catch( com.sun.star.uno.Exception e)
      {
        e.printStackTrace();
      }
    }
    else
    {
      try{
        /*
         * creates a Decryptor.
         */
        Object decryptor = m_xRemoteServiceManager.createInstanceWithContext(
          TestTool.DECRYPTOR_COMPONENT, m_xRemoteContext);
         
        m_xReferenceResolvedListener =
          (XReferenceResolvedListener)UnoRuntime.queryInterface(
            XReferenceResolvedListener.class, decryptor);
 
        /*
         * initializes the Decryptor.
         */
        XInitialization xInitialization = (XInitialization)UnoRuntime.queryInterface(XInitialization.class, m_xReferenceResolvedListener);
        Object args[]=new Object[5];
        args[0] = new Integer(m_nSecurityId).toString();
        args[1] = m_xSAXEventKeeper;
        args[2] = new Integer(m_nEncryptionElementCollectorId).toString();
        args[3] = m_xXMLSecurityContext;
        args[4] = m_xXMLEncryption;
        xInitialization.initialize(args);
       
        /*
         * sets decryption result listener.
         */
        XDecryptionResultBroadcaster m_xDecryptionResultBroadcaster =
View Full Code Here

            xFrames.append(xFrame);
           
           
            log.println("attach ObjectInspector to floating frame...");
           
            XInitialization xOII = (XInitialization) UnoRuntime.queryInterface(XInitialization.class, xInspectorModel);
           
            xOII.initialize(new Object[0]);
           
            xInspector.setInspectorModel(xInspectorModel);
           
            // for debug purposes the following lines could commented out. But in
            // this case the com.sun.star.frame.XController would be failed!
View Full Code Here

        the_frame2.setName("DatasourceBrowser");

        XInterface oObj = null;

        XInitialization xInit = (XInitialization) UnoRuntime.queryInterface(
                                        XInitialization.class,
                                        the_frame2.getController());

        PropertyValue[] params = new PropertyValue[3];
        PropertyValue param1 = new PropertyValue();
View Full Code Here

        log.println("ImplementationName: "+ util.utils.getImplName(oObj));

        TestEnvironment tEnv = new TestEnvironment(oObj);

        final XInitialization xInit = (XInitialization)
                UnoRuntime.queryInterface(
                        XInitialization.class, the_frame2.getController());

        Object[] params = new Object[3];
        PropertyValue param1 = new PropertyValue();
        param1.Name = "DataSourceName";
        param1.Value = "Bibliography";
        params[0] = param1;
        PropertyValue param2 = new PropertyValue();
        param2.Name = "CommandType";
        param2.Value = new Integer(com.sun.star.sdb.CommandType.TABLE);
        params[1] = param2;
        PropertyValue param3 = new PropertyValue();
        param3.Name = "Command";
        param3.Value = "biblio";
        params[2] = param3;

        final Object[] fParams = params;

//        tEnv.addObjRelation("EventProducer",
//            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer(){
//                public void fireEvent() {
//                    fXComp.grabFocus();
//                }
//            });

        tEnv.addObjRelation("EventProducer",
            new ifc.accessibility._XAccessibleEventBroadcaster.EventProducer(){
                public void fireEvent() {
                    try {
                        xInit.initialize(fParams);
                    } catch(com.sun.star.uno.Exception e) {
                        e.printStackTrace();
                    }
                }
            });
View Full Code Here

        param3.Name = "Command";
        param3.Value = "biblio";
        params[2] = param3;

        try {
            XInitialization xInit = (XInitialization) UnoRuntime.queryInterface(
                                            XInitialization.class, oObj);
            xInit.initialize(params);
        } catch (com.sun.star.uno.Exception e) {
            // Some exception occures.FAILED
            e.printStackTrace(log);
            throw new StatusException("Couldn't initialize document", e);
        }
View Full Code Here

        the_frame2.setName("DatasourceBrowser");

        XInterface oObj = null;

        final XInitialization xInit = (XInitialization)
                UnoRuntime.queryInterface(
                        XInitialization.class, the_frame2.getController());

        PropertyValue[] params = new PropertyValue[3];
        PropertyValue param1 = new PropertyValue();
View Full Code Here

            wizardContext.put( PropertyNames.ACTIVE_CONNECTION, curTableDescriptor.DBConnection );
            wizardContext.put( "DataSource", curTableDescriptor.getDataSource() );
            wizardContext.put( PropertyNames.COMMAND_TYPE, CommandType.TABLE );
            wizardContext.put( PropertyNames.COMMAND, scomposedtablename );
            wizardContext.put( "DocumentUI", m_docUI );
            XInitialization xInitialization = UnoRuntime.queryInterface( XInitialization.class, oFormWizard );
            xInitialization.initialize( wizardContext.getPropertyValues() );
            XJobExecutor xJobExecutor = UnoRuntime.queryInterface( XJobExecutor.class, oFormWizard );
            xJobExecutor.trigger(PropertyNames.START);
        }
        catch (Exception e)
        {
View Full Code Here

    public void callSQLErrorMessageDialog(SQLException oSQLException, XWindow _xWindow)
    {
        try
        {
            Object oDialog = xMSF.createInstance("com.sun.star.sdb.ErrorMessageDialog");
            XInitialization xInitialization = UnoRuntime.queryInterface( XInitialization.class, oDialog );
            PropertyValue[] aPropertyValue = new PropertyValue[2];
            aPropertyValue[0] = Properties.createProperty("SQLException", oSQLException);
            aPropertyValue[1] = Properties.createProperty("ParentWindow", _xWindow);
            xInitialization.initialize(aPropertyValue);
            XExecutableDialog xExecutableDialog = UnoRuntime.queryInterface( XExecutableDialog.class, oDialog );
            xExecutableDialog.execute();
        }
        catch (com.sun.star.uno.Exception ex)
        {
View Full Code Here

TOP

Related Classes of com.sun.star.lang.XInitialization

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.