1. /*
  2. * @(#)PreferencesFactory.java 1.4 03/12/19
  3. *
  4. * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
  5. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
  6. */
  7. package java.util.prefs;
  8. import java.util.*;
  9. /**
  10. * A factory object that generates Preferences objects. Providers of
  11. * new {@link Preferences} implementations should provide corresponding
  12. * <tt>PreferencesFactory</tt> implementations so that the new
  13. * <tt>Preferences</tt> implementation can be installed in place of the
  14. * platform-specific default implementation.
  15. *
  16. * <p><strong>This class is for <tt>Preferences</tt> implementers only.
  17. * Normal users of the <tt>Preferences</tt> facility should have no need to
  18. * consult this documentation.</strong>
  19. *
  20. * @author Josh Bloch
  21. * @version 1.4, 12/19/03
  22. * @see Preferences
  23. * @since 1.4
  24. */
  25. public interface PreferencesFactory {
  26. /**
  27. * Returns the system root preference node. (Multiple calls on this
  28. * method will return the same object reference.)
  29. */
  30. Preferences systemRoot();
  31. /**
  32. * Returns the user root preference node corresponding to the calling
  33. * user. In a server, the returned value will typically depend on
  34. * some implicit client-context.
  35. */
  36. Preferences userRoot();
  37. }