Package com.sun.star.registry

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


    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

                                              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

    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();
                   
                    for(int i = 0; i < xRegistryKeys.length; ++ i) {
                        xaddFactories(new String[]{xRegistryKeys[i].getStringValue()});
                    }
                }
View Full Code Here

   */
  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

   */
  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

  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

  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

        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

   
    if (subKeys == null || subKeys.length == 0) return ;
   
    for (int i = 0; i < subKeys.length; i++) {
      printKeyInfo(key, subKeys[i], out, margin) ;
      XRegistryKey subKey = key.openKey
        (getShortKeyName(subKeys[i])) ;
      printTreeInfo(subKey, out, margin + "  ") ;
      subKey.closeKey() ;
    }
  }
View Full Code Here

TOP

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

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.