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