Examples of BackingStoreException


Examples of java.util.prefs.BackingStoreException

        {
            directoryService.getAdminSession().delete( dn );
        }
        catch ( Exception e )
        {
            throw new BackingStoreException( e );
        }

        changes.clear();
        keyToChange.clear();
    }
View Full Code Here

Examples of java.util.prefs.BackingStoreException

        {
            directoryService.getAdminSession().modify( dn, changes );
        }
        catch ( Exception e )
        {
            throw new BackingStoreException( e );
        }

        changes.clear();
        keyToChange.clear();
    }
View Full Code Here

Examples of java.util.prefs.BackingStoreException

                children.add( ( String ) entry.getDn().getRdn().getNormValue() );
            }
        }
        catch ( Exception e )
        {
            throw new BackingStoreException( e );
        }

        return children.toArray( EMPTY_STRINGS );
    }
View Full Code Here

Examples of java.util.prefs.BackingStoreException

                keys.add( attr.getUpId() );
            }
        }
        catch ( Exception e )
        {
            throw new BackingStoreException( e );
        }

        return keys.toArray( EMPTY_STRINGS );
    }
View Full Code Here

Examples of java.util.prefs.BackingStoreException

      queryValueMethod.setAccessible(true);

      int[] result = (int[]) openKeyMethod.invoke(null, hive, stringToByteArray(keyName), KEY_READ);
      if (result[ERROR_CODE] != ERROR_SUCCESS) {
        if (result[ERROR_CODE] == ERROR_FILE_NOT_FOUND) {
          throw new BackingStoreException("Not Found error opening key " + keyName);
        } else {
          throw new BackingStoreException("Error " + result[ERROR_CODE] + " opening key " + keyName);
        }
      }

      int hKey = result[NATIVE_HANDLE];

      byte[] b = (byte[]) queryValueMethod.invoke(null, hKey, stringToByteArray(valueName));
      closeKeyMethod.invoke(null, hKey);

      if (b == null)
        return null;
      else
        return byteArrayToString(b);
    } catch (InvocationTargetException e) {
      throw new BackingStoreException(e.getCause());
    } catch (NoSuchMethodException e) {
      throw new BackingStoreException(e);
    } catch (IllegalAccessException e) {
      throw new BackingStoreException(e);
    }
  }
View Full Code Here

Examples of java.util.prefs.BackingStoreException

      queryValueMethod.setAccessible(true);

      int[] result = (int[]) openKeyMethod.invoke(null, hive, stringToByteArray(keyName), KEY_READ);
      if (result[ERROR_CODE] != ERROR_SUCCESS) {
        if (result[ERROR_CODE] == ERROR_FILE_NOT_FOUND) {
          throw new BackingStoreException("Not Found error opening key " + keyName);
        } else {
          throw new BackingStoreException("Error " + result[ERROR_CODE] + " opening key " + keyName);
        }
      }

      int hKey = result[NATIVE_HANDLE];

      byte[] b = (byte[]) queryValueMethod.invoke(null, hKey, stringToByteArray(valueName));
      closeKeyMethod.invoke(null, hKey);

      if (b == null) {
        return null;
      } else {
        return byteArrayToString(b);
      }
    } catch (InvocationTargetException e) {
      throw new BackingStoreException(e.getCause());
    } catch (NoSuchMethodException e) {
      throw new BackingStoreException(e);
    } catch (IllegalAccessException e) {
      throw new BackingStoreException(e);
    }
  }
View Full Code Here

Examples of java.util.prefs.BackingStoreException

        {
            directoryService.getAdminSession().modify( dn, changes );
        }
        catch ( Exception e )
        {
            throw new BackingStoreException( e );
        }

        changes.clear();
        keyToChange.clear();
    }
View Full Code Here

Examples of java.util.prefs.BackingStoreException

        {
            directoryService.getAdminSession().delete( dn );
        }
        catch ( Exception e )
        {
            throw new BackingStoreException( e );
        }

        changes.clear();
        keyToChange.clear();
    }
View Full Code Here

Examples of java.util.prefs.BackingStoreException

        {
            directoryService.getAdminSession().modify( dn, changes );
        }
        catch ( Exception e )
        {
            throw new BackingStoreException( e );
        }

        changes.clear();
        keyToChange.clear();
    }
View Full Code Here

Examples of java.util.prefs.BackingStoreException

                children.add( ( String ) entry.getDn().getRdn().getValue() );
            }
        }
        catch ( Exception e )
        {
            throw new BackingStoreException( e );
        }

        return children.toArray( EMPTY_STRINGS );
    }
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.