private ISecurePreferences getSecurePreferences() { if (!securePreferencesDisabled.get()) { String serverId = getServerId(); if (serverId != null) { ISecurePreferences securePreferences = SecurePreferencesFactory.getDefault().node( CloudFoundryPlugin.PLUGIN_ID); securePreferences = securePreferences.node(EncodingUtils.encodeSlashes(serverId)); return securePreferences; } } return null; }
Preferences getSharedPreferences() { if (agentLocation == null) return null; IPreferencesService prefService = (IPreferencesService) ServiceHelper.getService(Activator.getContext(), IPreferencesService.class.getName()); if (prefService == null) return null; try { //see ProfileScope for preference path format String locationString = EncodingUtils.encodeSlashes(agentLocation.getRootLocation().toString()); return prefService.getRootNode().node("/profile/shared/" + locationString + "/_SELF_/" + getBundleId() + '/' + NODE_REPOSITORIES); //$NON-NLS-1$ //$NON-NLS-2$ } catch (IllegalArgumentException e) { return null; } }
/** * Return the preference node which is the root for where we store the repository information. * Returns <code>null</code> if no preferences are available */ Preferences getPreferences() { if (agentLocation == null) return null; IPreferencesService prefService = (IPreferencesService) ServiceHelper.getService(Activator.getContext(), IPreferencesService.class.getName()); if (prefService == null) return null; try { //see ProfileScope for preference path format String locationString = EncodingUtils.encodeSlashes(agentLocation.getRootLocation().toString()); return prefService.getRootNode().node("/profile/" + locationString + "/_SELF_/" + getBundleId() + '/' + NODE_REPOSITORIES); //$NON-NLS-1$ //$NON-NLS-2$ } catch (IllegalArgumentException e) { return null; } }
Preferences getSharedPreferences() { if (agentLocation == null) return null; IPreferencesService prefService = ServiceHelper.getService(Activator.getContext(), IPreferencesService.class); if (prefService == null) return null; try { //see ProfileScope for preference path format String locationString = EncodingUtils.encodeSlashes(agentLocation.getRootLocation().toString()); return prefService.getRootNode().node("/profile/shared/" + locationString + "/_SELF_/" + getBundleId() + '/' + NODE_REPOSITORIES); //$NON-NLS-1$ //$NON-NLS-2$ } catch (IllegalArgumentException e) { return null; } }
/** * Return the preference node which is the root for where we store the repository information. * Returns <code>null</code> if no preferences are available */ Preferences getPreferences() { if (agentLocation == null) return null; IPreferencesService prefService = ServiceHelper.getService(Activator.getContext(), IPreferencesService.class); if (prefService == null) return null; try { //see ProfileScope for preference path format String locationString = EncodingUtils.encodeSlashes(agentLocation.getRootLocation().toString()); return prefService.getRootNode().node("/profile/" + locationString + "/_SELF_/" + getBundleId() + '/' + NODE_REPOSITORIES); //$NON-NLS-1$ //$NON-NLS-2$ } catch (IllegalArgumentException e) { return null; } }