add(new ExportCheckBox(USER_PREFS, new PropertyModel<Boolean>(this, "doUserPrefs")));
add(new Label("userPrefsLabel", new ResourceModel("export.user_preferences")));
this.exportResourceProvider = new ExportResourceProvider(getPortletRequest().getUserPrincipal().getName());
DynamicResourceLink downloadLink = new DynamicResourceLink("exportLink", new PropertyModel<ExportResourceProvider>(this,
"exportResourceProvider"))
{
private static final long serialVersionUID = 0L;
@Override
public void onClick()
{
Map<String, Object> settings = new HashMap<String, Object>();
settings.put(JetspeedSerializer.KEY_PROCESS_USERS, new Boolean(doUserGroupsRoles));
settings.put(JetspeedSerializer.KEY_PROCESS_PERMISSIONS, new Boolean(doPermissions));
settings.put(JetspeedSerializer.KEY_PROCESS_PROFILER, new Boolean(doProfiling));
settings.put(JetspeedSerializer.KEY_PROCESS_CAPABILITIES, new Boolean(doCapabilities));
settings.put(JetspeedSerializer.KEY_PROCESS_SSO, new Boolean(doSSO));
settings.put(JetspeedSerializer.KEY_PROCESS_USER_PREFERENCES, new Boolean(doUserPrefs));
settings.put(JetspeedSerializer.KEY_EXPORT_INDENTATION, "\t");
settings.put(JetspeedSerializer.KEY_OVERWRITE_EXISTING, Boolean.TRUE);
settings.put(JetspeedSerializer.KEY_BACKUP_BEFORE_PROCESS, Boolean.FALSE);
exportResourceProvider.setSettings(settings);
}
};
downloadLink.add(new Label("exportAction", new ResourceModel("export.action")));
add(downloadLink);
};