use of org.activityinfo.legacy.shared.model.UserDatabaseDTO in project activityinfo by bedatadriven.
the class SchemaCsvWriterV3Test method setup.
@Before
public void setup() throws IOException {
LocaleProxy.initialize();
database = new UserDatabaseDTO(1, "Survey DB");
formClassProvider = new TestBatchFormClassProvider();
setupSurveyForm();
setupMonthly();
expectedSurveyExport = readExport("survey.csv");
}
use of org.activityinfo.legacy.shared.model.UserDatabaseDTO in project activityinfo by bedatadriven.
the class NewDbExistingListPage method updateDialogData.
private void updateDialogData() {
UserDatabaseDTO db = getSelectedDb();
dialogData.setSourceDatabaseCountryId(db.getCountry().getId());
dialogData.getCommand().setSourceDatabaseId(db.getId());
dialogData.setHasDesignPrivileges(db.isDesignAllowed());
}
use of org.activityinfo.legacy.shared.model.UserDatabaseDTO in project activityinfo by bedatadriven.
the class SiteGridPanel method updateHeading.
private void updateHeading(final Filter filter) {
setHeadingText(I18N.CONSTANTS.sitesHeader());
dispatcher.execute(new GetSchema(), new AsyncCallback<SchemaDTO>() {
@Override
public void onFailure(Throwable caught) {
// TODO Auto-generated method stub
}
@Override
public void onSuccess(SchemaDTO result) {
if (filter.isDimensionRestrictedToSingleCategory(DimensionType.Activity)) {
int activityId = filter.getRestrictedCategory(DimensionType.Activity);
ActivityDTO activity = result.getActivityById(activityId);
setHeadingText(activity.getDatabaseName() + " - " + activity.getName());
} else if (filter.isDimensionRestrictedToSingleCategory(DimensionType.Database)) {
int databaseId = filter.getRestrictedCategory(DimensionType.Database);
UserDatabaseDTO db = result.getDatabaseById(databaseId);
setHeadingText(db.getName());
}
}
});
}
Aggregations