Examples of XRegistryKey


Examples of com.sun.star.registry.XRegistryKey

    public XRegistryKey openKey( /*IN*/String aKeyName ) throws InvalidRegistryException, com.sun.star.uno.RuntimeException {
    return (XRegistryKey)_keys.get(aKeyName);
  }

    public XRegistryKey createKey( /*IN*/String aKeyName ) throws InvalidRegistryException, com.sun.star.uno.RuntimeException {
    XRegistryKey xRegistryKey = openKey(aKeyName);

    if(xRegistryKey == null) {
      xRegistryKey = new RegistryKey(aKeyName);
      _keys.put(aKeyName, xRegistryKey);
    }
View Full Code Here

Examples of com.sun.star.registry.XRegistryKey

                                              compContext._xMultiServiceFactory.createInstance("com.sun.star.loader.Java"));

      Object serviceManager = compContext._xMultiServiceFactory.createInstance("com.sun.star.lang.ServiceManager");
      XSet serviceManager_xSet = (XSet)UnoRuntime.queryInterface(XSet.class, serviceManager);

      XRegistryKey xRegistryKey = new RegistryKey("ROOT");

      loader.writeRegistryInfo(xRegistryKey, null, componentName);

      String keys[] = xRegistryKey.getKeyNames();
      for(int j = 0; j < keys.length; ++ j) {
        String implName = keys[j].substring(1);
        implName = implName.substring(0, implName.length() - "/UNO/SERVICES".length());

        Object factory = loader.activate(implName, null, componentName, xRegistryKey);
View Full Code Here

Examples of com.sun.star.registry.XRegistryKey

        boolean result = false;

        try {
            openReg(oObj, openF, false, true);

            XRegistryKey rootKey = oObj.getRootKey();
            result = rootKey != null;
            closeReg(oObj);
        } catch (InvalidRegistryException e) {
            e.printStackTrace(log);
            result = false;
View Full Code Here

Examples of com.sun.star.registry.XRegistryKey

        }

        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

Examples of com.sun.star.registry.XRegistryKey

        {
            String currentLocale = null;
            try
            {
                simpleReg.open(path, true, false);
                XRegistryKey xRegistryRootKey = simpleReg.getRootKey();
                // read locale
                XRegistryKey locale = xRegistryRootKey.openKey(value);
                if ( locale != null )
                {
                    final String newLocale = locale.getStringValue();
                    if ( newLocale != null )
                    {
                        currentLocale = newLocale.replace('-', '_');
                    }
                }
View Full Code Here

Examples of com.sun.star.registry.XRegistryKey

   */
  static public boolean writeRegistryServiceInfo(String implName, String serviceName, XRegistryKey regKey) {
      boolean result = false;
     
        try {
          XRegistryKey newKey = regKey.createKey("/" + implName + "/UNO/SERVICES");
        
      newKey.createKey(serviceName);
         
          result = true;
        }
        catch (Exception ex) {
            System.err.println(">>>Connection_Impl.writeRegistryServiceInfo " + ex);
View Full Code Here

Examples of com.sun.star.registry.XRegistryKey

  public static boolean writeRegistryServiceInfo(
        String impl_name, String supported_services [], XRegistryKey xKey )
    {
        try
        {
          XRegistryKey xNewKey = xKey.createKey( "/" + impl_name + "/UNO/SERVICES" );
            for ( int nPos = 0; nPos < supported_services.length; ++nPos )
            {
                xNewKey.createKey( supported_services[ nPos ] );
            }
          return true;
        }
        catch (com.sun.star.registry.InvalidRegistryException exc)
        {
View Full Code Here

Examples of com.sun.star.registry.XRegistryKey

   */
  public static boolean writeRegistryServiceInfo(XRegistryKey regKey) {
      boolean result = false;
     
      try {
          XRegistryKey newKey = regKey.createKey("/" + JavaLoader.class.getName() + "/UNO/SERVICE");
        
          for (int i=0; i<supportedServices.length; i++)
              newKey.createKey(supportedServices[i]);
         
          result = true;
      }
      catch (Exception ex) {
          if (DEBUG) System.err.println(">>>JavaLoader.writeRegistryServiceInfo " + ex);
View Full Code Here

Examples of com.sun.star.registry.XRegistryKey

        {
            String currentLocale = null;
            try
            {
                simpleReg.open(path, true, false);
                final XRegistryKey xRegistryRootKey = simpleReg.getRootKey();
                // read locale
                final XRegistryKey locale = xRegistryRootKey.openKey(value);
                if ( locale != null )
                {
                    final String newLocale = locale.getStringValue();
                    if ( newLocale != null )
                    {
                        currentLocale = newLocale.replace('-', '_');
                    }
                }
View Full Code Here

Examples of com.sun.star.registry.XRegistryKey

        return false ;
       
      for (int i = 0; i < keyNames1.length; i++) {
     
        String keyName = getShortKeyName(keyNames1[i]) ;
        XRegistryKey key2 = tree2.openKey(keyName) ;
       
        if (key2 == null)
        // key with the same name doesn't exist in the second tree
          return false ;
     
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.