Search in sources :

Example 1 with PreheatParams

use of org.hisp.dhis.preheat.PreheatParams in project dhis2-core by dhis2.

the class DefaultObjectBundleService method create.

@Override
public ObjectBundle create(ObjectBundleParams params) {
    PreheatParams preheatParams = params.getPreheatParams();
    if (params.getUser() == null) {
        params.setUser(currentUserService.getCurrentUser());
    }
    preheatParams.setUser(params.getUser());
    preheatParams.setObjects(params.getObjects());
    ObjectBundle bundle = new ObjectBundle(params, preheatService.preheat(preheatParams), params.getObjects());
    bundle.setObjectBundleStatus(ObjectBundleStatus.CREATED);
    bundle.setObjectReferences(preheatService.collectObjectReferences(params.getObjects()));
    return bundle;
}
Also used : PreheatParams(org.hisp.dhis.preheat.PreheatParams)

Example 2 with PreheatParams

use of org.hisp.dhis.preheat.PreheatParams in project dhis2-core by dhis2.

the class ObjectBundleParams method getPreheatParams.

public PreheatParams getPreheatParams() {
    PreheatParams params = new PreheatParams();
    params.setPreheatIdentifier(preheatIdentifier);
    params.setPreheatMode(preheatMode);
    return params;
}
Also used : PreheatParams(org.hisp.dhis.preheat.PreheatParams)

Aggregations

PreheatParams (org.hisp.dhis.preheat.PreheatParams)2