Search in sources :

Example 1 with GetAdminLevels

use of org.activityinfo.legacy.shared.command.GetAdminLevels in project activityinfo by bedatadriven.

the class Dimensions method queryAdminLevels.

private static GetAdminLevels queryAdminLevels(Set<Integer> indicators) {
    GetAdminLevels query = new GetAdminLevels();
    query.setIndicatorIds(indicators);
    return query;
}
Also used : GetAdminLevels(org.activityinfo.legacy.shared.command.GetAdminLevels)

Example 2 with GetAdminLevels

use of org.activityinfo.legacy.shared.command.GetAdminLevels in project activityinfo by bedatadriven.

the class AdminLevelPanel method setIndicators.

public void setIndicators(Collection<Integer> indicatorIds) {
    showLoading();
    GetAdminLevels query = new GetAdminLevels();
    query.setIndicatorIds(Sets.newHashSet(indicatorIds));
    dispatcher.execute(query, new AsyncCallback<AdminLevelResult>() {

        @Override
        public void onFailure(Throwable caught) {
            showLoadingFailed();
        }

        @Override
        public void onSuccess(AdminLevelResult result) {
            showOptions(result.getData());
        }
    });
}
Also used : AdminLevelResult(org.activityinfo.legacy.shared.command.result.AdminLevelResult) GetAdminLevels(org.activityinfo.legacy.shared.command.GetAdminLevels)

Example 3 with GetAdminLevels

use of org.activityinfo.legacy.shared.command.GetAdminLevels in project activityinfo by bedatadriven.

the class ClusteringOptionsWidget method loadForm.

public void loadForm(final MapLayer layer) {
    // mask();
    destroyForm();
    GetAdminLevels query = new GetAdminLevels();
    query.setIndicatorIds(Sets.newHashSet(layer.getIndicatorIds()));
    service.execute(query, new AsyncCallback<AdminLevelResult>() {

        @Override
        public void onFailure(Throwable caught) {
        // TODO Auto-generated method stub
        }

        @Override
        public void onSuccess(AdminLevelResult result) {
            buildForm(result.getData());
        }
    });
}
Also used : AdminLevelResult(org.activityinfo.legacy.shared.command.result.AdminLevelResult) GetAdminLevels(org.activityinfo.legacy.shared.command.GetAdminLevels)

Example 4 with GetAdminLevels

use of org.activityinfo.legacy.shared.command.GetAdminLevels in project activityinfo by bedatadriven.

the class GetAdminLevelsHandlerTest method test.

@Test
public void test() {
    GetAdminLevels query = new GetAdminLevels();
    query.setIndicatorIds(Sets.newHashSet(1));
    AdminLevelResult result = execute(query);
    System.out.println(result.getData());
}
Also used : AdminLevelResult(org.activityinfo.legacy.shared.command.result.AdminLevelResult) GetAdminLevels(org.activityinfo.legacy.shared.command.GetAdminLevels) Test(org.junit.Test)

Aggregations

GetAdminLevels (org.activityinfo.legacy.shared.command.GetAdminLevels)4 AdminLevelResult (org.activityinfo.legacy.shared.command.result.AdminLevelResult)3 Test (org.junit.Test)1