// Overrideable method to add extra logic to append user preferences. The default implementation
// will simply read from the gadget spec for inline user prefs.
protected void addAllUserPrefs(UriBuilder uri, Gadget gadget, View view, boolean useTpl) {
GadgetContext context = gadget.getContext();
UserPrefs prefs = context.getUserPrefs();
for (UserPref up : gadget.getSpec().getUserPrefs().values()) {
String name = up.getName();
String data = prefs.getPref(name);
if (data == null) {
data = up.getDefaultValue();
}
boolean upInFragment = !view.needsUserPrefSubstitution();