Package org.jabylon.common.util
Class PreferencesUtil
- java.lang.Object
-
- org.jabylon.common.util.PreferencesUtil
-
public class PreferencesUtil extends Object
- Author:
- Johannes Utzig (jutzig.dev@googlemail.com)
-
-
Field Summary
Fields Modifier and Type Field Description static StringNODE_CHECKSstatic com.google.common.base.Supplier<URIResolver>resolverstatic StringSCAN_CONFIG_EXCLUDEstatic StringSCAN_CONFIG_INCLUDEstatic StringSCAN_CONFIG_MASTER_LOCALE
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcloneNode(org.osgi.service.prefs.Preferences source, org.osgi.service.prefs.Preferences target)copies all values and child nodes of the source into the target nodestatic voidcopyChildPreferences(org.osgi.service.prefs.Preferences oldParent, org.osgi.service.prefs.Preferences newParent)static voiddeleteNode(org.osgi.service.prefs.Preferences node)static org.osgi.service.prefs.PreferencesgetNodeForJob(org.osgi.service.prefs.Preferences context, String jobID)static org.jabylon.properties.ScanConfigurationgetScanConfigForProject(org.jabylon.properties.Project project)static org.osgi.service.prefs.PreferencesrenamePreferenceNode(org.osgi.service.prefs.Preferences node, String newName)static org.osgi.service.prefs.PreferencesrootScope()static org.osgi.service.prefs.PreferencesscopeFor(Object eobject)protected static voidshallowClonePreferences(org.osgi.service.prefs.Preferences node, org.osgi.service.prefs.Preferences clone)static org.eclipse.emf.common.util.URItoLookupURI(org.osgi.service.prefs.Preferences prefs)converts a pref node path to a URI that can be resolved by anURIResolverstatic org.osgi.service.prefs.PreferencesworkspaceScope()
-
-
-
Field Detail
-
SCAN_CONFIG_INCLUDE
public static final String SCAN_CONFIG_INCLUDE
- See Also:
- Constant Field Values
-
SCAN_CONFIG_EXCLUDE
public static final String SCAN_CONFIG_EXCLUDE
- See Also:
- Constant Field Values
-
SCAN_CONFIG_MASTER_LOCALE
public static final String SCAN_CONFIG_MASTER_LOCALE
- See Also:
- Constant Field Values
-
NODE_CHECKS
public static final String NODE_CHECKS
- See Also:
- Constant Field Values
-
resolver
public static final com.google.common.base.Supplier<URIResolver> resolver
-
-
Method Detail
-
scopeFor
public static org.osgi.service.prefs.Preferences scopeFor(Object eobject)
-
toLookupURI
public static org.eclipse.emf.common.util.URI toLookupURI(org.osgi.service.prefs.Preferences prefs)
converts a pref node path to a URI that can be resolved by anURIResolver- Parameters:
prefs-- Returns:
-
cloneNode
public static void cloneNode(org.osgi.service.prefs.Preferences source, org.osgi.service.prefs.Preferences target) throws org.osgi.service.prefs.BackingStoreExceptioncopies all values and child nodes of the source into the target node- Parameters:
source-target-- Throws:
org.osgi.service.prefs.BackingStoreException
-
workspaceScope
public static org.osgi.service.prefs.Preferences workspaceScope()
-
rootScope
public static org.osgi.service.prefs.Preferences rootScope()
- Returns:
- the jabylon root preference node
-
deleteNode
public static void deleteNode(org.osgi.service.prefs.Preferences node) throws org.osgi.service.prefs.BackingStoreException- Throws:
org.osgi.service.prefs.BackingStoreException
-
renamePreferenceNode
public static org.osgi.service.prefs.Preferences renamePreferenceNode(org.osgi.service.prefs.Preferences node, String newName)
-
shallowClonePreferences
protected static void shallowClonePreferences(org.osgi.service.prefs.Preferences node, org.osgi.service.prefs.Preferences clone)
-
copyChildPreferences
public static void copyChildPreferences(org.osgi.service.prefs.Preferences oldParent, org.osgi.service.prefs.Preferences newParent) throws org.osgi.service.prefs.BackingStoreException- Throws:
org.osgi.service.prefs.BackingStoreException
-
getScanConfigForProject
public static final org.jabylon.properties.ScanConfiguration getScanConfigForProject(org.jabylon.properties.Project project)
-
getNodeForJob
public static org.osgi.service.prefs.Preferences getNodeForJob(org.osgi.service.prefs.Preferences context, String jobID)
-
-