Package com.sun.star.registry

Examples of com.sun.star.registry.XSimpleRegistry


        {
            final ClassLoader cl = java.lang.Thread.currentThread().getContextClassLoader();
            Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
            try
            {
                final XSimpleRegistry simpleReg = (XSimpleRegistry) UnoRuntime.queryInterface(XSimpleRegistry.class,
                    m_cmpCtx.getServiceManager().createInstanceWithContext("com.sun.star.configuration.ConfigurationRegistry", m_cmpCtx));

                String currentLocale = getLocaleFromRegistry(simpleReg,"org.openoffice.Setup","L10N/ooSetupSystemLocale");
                if ( currentLocale == null || "".equals(currentLocale) )
                {
View Full Code Here


  */
    public static XSimpleRegistry openRegistry
      (String file, XMultiServiceFactory xMSF)
      throws com.sun.star.uno.Exception {
     
      XSimpleRegistry reg = createRegistryService(xMSF) ;
     
      reg.open(file, false, true) ;
     
      return reg ;
    }
View Full Code Here

            // insert java loader
            XSet xSet = (XSet)AnyConverter.toObject(
                new Type( XSet.class ), xContext.getServiceManager() );
            xSet.insert( new com.sun.star.comp.loader.JavaLoaderFactory( xMgr ) );
            // get rdb of smgr
            XSimpleRegistry xRDB = (XSimpleRegistry)AnyConverter.toObject(
                new Type( XSimpleRegistry.class ), xProps.getPropertyValue( "Registry" ) );
            // register impl
            XImplementationRegistration xImpReg =
                UnoRuntime.queryInterface(
                    XImplementationRegistration.class,
View Full Code Here

     * @see    com.sun.star.lang.XSimpleRegistry
     */
  public void initialize( Object args[] )
        throws   com.sun.star.uno.Exception,
            com.sun.star.uno.RuntimeException {
    XSimpleRegistry xSimpleRegistry = null;
    try {
      xSimpleRegistry = (XSimpleRegistry) args[0];
            if (xSimpleRegistry != null)
            {
                XRegistryKey rootkey = xSimpleRegistry.getRootKey();
               
                XRegistryKey implkey_xRegistryKey = rootkey.openKey("Implementations");
                if(implkey_xRegistryKey != null) {
                    XRegistryKey xRegistryKeys[] = implkey_xRegistryKey.openKeys();
                   
View Full Code Here

     * @see    com.sun.star.lang.XSimpleRegistry
     */
  public void initialize( Object args[] )
        throws   com.sun.star.uno.Exception,
            com.sun.star.uno.RuntimeException {
    XSimpleRegistry xSimpleRegistry  ;
    try {
      xSimpleRegistry = (XSimpleRegistry) args[0];
            if (xSimpleRegistry != null)
            {
                XRegistryKey rootkey = xSimpleRegistry.getRootKey();
               
                XRegistryKey implkey_xRegistryKey = rootkey.openKey("Implementations");
                if(implkey_xRegistryKey != null) {
                    XRegistryKey xRegistryKeys[] = implkey_xRegistryKey.openKeys();
                   
View Full Code Here

            // insert java loader
            XSet xSet = (XSet)AnyConverter.toObject(
                new Type( XSet.class ), xContext.getServiceManager() );
            xSet.insert( new com.sun.star.comp.loader.JavaLoaderFactory( xMgr ) );
            // get rdb of smgr
            XSimpleRegistry xRDB = (XSimpleRegistry)AnyConverter.toObject(
                new Type( XSimpleRegistry.class ), xProps.getPropertyValue( "Registry" ) );
            // register impl
            XImplementationRegistration xImpReg =
                UnoRuntime.queryInterface(
                    XImplementationRegistration.class,
View Full Code Here

                            "Couldn't create implementation registration");
                e.printStackTrace();
                throw new StatusException("Couldn't create ImplReg", e);
            }

            XSimpleRegistry xReg = null;
            try {
                System.out.println("Register library: " + url);
                xir.registerImplementation(
                                    "com.sun.star.loader.Java2", url, xReg);
                System.out.println("...done");
View Full Code Here

                            "Couldn't create implementation registration");
                e.printStackTrace();
                throw new StatusException("Couldn't create ImplReg", e);
            }

            XSimpleRegistry xReg = null;
            try {
                System.out.println("Register library: " + url);
                xir.registerImplementation(
                                    "com.sun.star.loader.Java2", url, xReg);
                System.out.println("...done");
View Full Code Here

        {
            final ClassLoader cl = java.lang.Thread.currentThread().getContextClassLoader();
            Thread.currentThread().setContextClassLoader(this.getClass().getClassLoader());
            try
            {
                final XSimpleRegistry simpleReg = (XSimpleRegistry) UnoRuntime.queryInterface(XSimpleRegistry.class,
                        m_cmpCtx.getServiceManager().createInstanceWithContext("com.sun.star.configuration.ConfigurationRegistry", m_cmpCtx));

                String currentLocale = getLocaleFromRegistry(simpleReg, "org.openoffice.Setup", "L10N/ooSetupSystemLocale");
                if (currentLocale == null || "".equals(currentLocale))
                {
View Full Code Here

            return;
        }

        boolean isEqual = false;
        XSimpleRegistry reg = null;

        try {
            reg = RegistryTools.createRegistryService((XMultiServiceFactory) tParam.getMSF());
        } catch (com.sun.star.uno.Exception e) {
            log.print("Can't create registry service: ");
            e.printStackTrace(log);
            tRes.tested("mergeKey()", false);

            return;
        }

        openReg(reg, mergeF, false, true);

        try {
            XRegistryKey key = oObj.getRootKey().openKey("MergeKey");
            XRegistryKey mergeKey = reg.getRootKey();
            isEqual = RegistryTools.compareKeyTrees(key, mergeKey);
        } catch (com.sun.star.registry.InvalidRegistryException e) {
            log.print("Can't get root key: ");
            e.printStackTrace(log);
            tRes.tested("mergeKey()", false);
View Full Code Here

TOP

Related Classes of com.sun.star.registry.XSimpleRegistry

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.