Search in sources :

Example 21 with UID

use of org.hisp.dhis.dxf2.events.trackedentity.store.query.EventQuery.COLUMNS.UID in project dhis2-core by dhis2.

the class AbstractEventService method getEvent.

@Transactional(readOnly = true)
@Override
public Event getEvent(ProgramStageInstance programStageInstance, boolean isSynchronizationQuery, boolean skipOwnershipCheck) {
    if (programStageInstance == null) {
        return null;
    }
    Event event = new Event();
    event.setEvent(programStageInstance.getUid());
    if (programStageInstance.getProgramInstance().getEntityInstance() != null) {
        event.setTrackedEntityInstance(programStageInstance.getProgramInstance().getEntityInstance().getUid());
    }
    event.setFollowup(programStageInstance.getProgramInstance().getFollowup());
    event.setEnrollmentStatus(EnrollmentStatus.fromProgramStatus(programStageInstance.getProgramInstance().getStatus()));
    event.setStatus(programStageInstance.getStatus());
    event.setEventDate(DateUtils.getIso8601NoTz(programStageInstance.getExecutionDate()));
    event.setDueDate(DateUtils.getIso8601NoTz(programStageInstance.getDueDate()));
    event.setStoredBy(programStageInstance.getStoredBy());
    event.setCompletedBy(programStageInstance.getCompletedBy());
    event.setCompletedDate(DateUtils.getIso8601NoTz(programStageInstance.getCompletedDate()));
    event.setCreated(DateUtils.getIso8601NoTz(programStageInstance.getCreated()));
    event.setCreatedByUserInfo(programStageInstance.getCreatedByUserInfo());
    event.setLastUpdatedByUserInfo(programStageInstance.getLastUpdatedByUserInfo());
    event.setCreatedAtClient(DateUtils.getIso8601NoTz(programStageInstance.getCreatedAtClient()));
    event.setLastUpdated(DateUtils.getIso8601NoTz(programStageInstance.getLastUpdated()));
    event.setLastUpdatedAtClient(DateUtils.getIso8601NoTz(programStageInstance.getLastUpdatedAtClient()));
    event.setGeometry(programStageInstance.getGeometry());
    event.setDeleted(programStageInstance.isDeleted());
    if (programStageInstance.getAssignedUser() != null) {
        event.setAssignedUser(programStageInstance.getAssignedUser().getUid());
        event.setAssignedUserUsername(programStageInstance.getAssignedUser().getUsername());
        event.setAssignedUserDisplayName(programStageInstance.getAssignedUser().getName());
    }
    User user = currentUserService.getCurrentUser();
    OrganisationUnit ou = programStageInstance.getOrganisationUnit();
    List<String> errors = trackerAccessManager.canRead(user, programStageInstance, skipOwnershipCheck);
    if (!errors.isEmpty()) {
        throw new IllegalQueryException(errors.toString());
    }
    if (ou != null) {
        event.setOrgUnit(ou.getUid());
        event.setOrgUnitName(ou.getName());
    }
    Program program = programStageInstance.getProgramInstance().getProgram();
    event.setProgram(program.getUid());
    event.setEnrollment(programStageInstance.getProgramInstance().getUid());
    event.setProgramStage(programStageInstance.getProgramStage().getUid());
    CategoryOptionCombo attributeOptionCombo = programStageInstance.getAttributeOptionCombo();
    if (attributeOptionCombo != null) {
        event.setAttributeOptionCombo(attributeOptionCombo.getUid());
        event.setAttributeCategoryOptions(String.join(";", attributeOptionCombo.getCategoryOptions().stream().map(CategoryOption::getUid).collect(Collectors.toList())));
    }
    if (programStageInstance.getProgramInstance().getEntityInstance() != null) {
        event.setTrackedEntityInstance(programStageInstance.getProgramInstance().getEntityInstance().getUid());
    }
    Collection<EventDataValue> dataValues;
    if (!isSynchronizationQuery) {
        dataValues = programStageInstance.getEventDataValues();
    } else {
        Set<String> dataElementsToSync = programStageInstance.getProgramStage().getProgramStageDataElements().stream().filter(psde -> !psde.getSkipSynchronization()).map(psde -> psde.getDataElement().getUid()).collect(Collectors.toSet());
        dataValues = programStageInstance.getEventDataValues().stream().filter(dv -> dataElementsToSync.contains(dv.getDataElement())).collect(Collectors.toSet());
    }
    for (EventDataValue dataValue : dataValues) {
        if (getDataElement(user.getUid(), dataValue.getDataElement())) {
            DataValue value = new DataValue();
            value.setCreated(DateUtils.getIso8601NoTz(dataValue.getCreated()));
            value.setCreatedByUserInfo(dataValue.getCreatedByUserInfo());
            value.setLastUpdated(DateUtils.getIso8601NoTz(dataValue.getLastUpdated()));
            value.setLastUpdatedByUserInfo(dataValue.getLastUpdatedByUserInfo());
            value.setDataElement(dataValue.getDataElement());
            value.setValue(dataValue.getValue());
            value.setProvidedElsewhere(dataValue.getProvidedElsewhere());
            value.setStoredBy(dataValue.getStoredBy());
            event.getDataValues().add(value);
        } else {
            log.info("Can not find a Data Element having UID [" + dataValue.getDataElement() + "]");
        }
    }
    event.getNotes().addAll(NoteHelper.convertNotes(programStageInstance.getComments()));
    event.setRelationships(programStageInstance.getRelationshipItems().stream().filter(Objects::nonNull).map((r) -> relationshipService.getRelationship(r.getRelationship(), RelationshipParams.FALSE, user)).collect(Collectors.toSet()));
    return event;
}
Also used : ListGrid(org.hisp.dhis.system.grid.ListGrid) Arrays(java.util.Arrays) CategoryService(org.hisp.dhis.category.CategoryService) FIRST_PAGE(org.hisp.dhis.common.SlimPager.FIRST_PAGE) CategoryOption(org.hisp.dhis.category.CategoryOption) ValidationUtils(org.hisp.dhis.system.util.ValidationUtils) EventRow(org.hisp.dhis.dxf2.events.report.EventRow) ProgramStageDataElement(org.hisp.dhis.program.ProgramStageDataElement) StringUtils(org.apache.commons.lang3.StringUtils) EVENT_CREATED_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_CREATED_ID) EVENT_EXECUTION_DATE_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_EXECUTION_DATE_ID) ImportSummary(org.hisp.dhis.dxf2.importsummary.ImportSummary) EnrollmentStatus(org.hisp.dhis.dxf2.events.enrollment.EnrollmentStatus) EventSyncService(org.hisp.dhis.program.EventSyncService) FileResourceService(org.hisp.dhis.fileresource.FileResourceService) Map(java.util.Map) EventDataValue(org.hisp.dhis.eventdatavalue.EventDataValue) JobConfiguration(org.hisp.dhis.scheduling.JobConfiguration) EVENT_STATUS_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_STATUS_ID) OrganisationUnitSelectionMode(org.hisp.dhis.common.OrganisationUnitSelectionMode) TrackedEntityInstance(org.hisp.dhis.trackedentity.TrackedEntityInstance) DateUtils.getMediumDateString(org.hisp.dhis.util.DateUtils.getMediumDateString) Set(java.util.Set) SchemaService(org.hisp.dhis.schema.SchemaService) TrackerOwnershipManager(org.hisp.dhis.trackedentity.TrackerOwnershipManager) Slf4j(lombok.extern.slf4j.Slf4j) CategoryOptionCombo(org.hisp.dhis.category.CategoryOptionCombo) TrackedEntityComment(org.hisp.dhis.trackedentitycomment.TrackedEntityComment) ProgramType(org.hisp.dhis.program.ProgramType) ProgramInstanceService(org.hisp.dhis.program.ProgramInstanceService) TrackedEntityCommentService(org.hisp.dhis.trackedentitycomment.TrackedEntityCommentService) EVENT_STORED_BY_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_STORED_BY_ID) QueryItem(org.hisp.dhis.common.QueryItem) ProgramStageInstance(org.hisp.dhis.program.ProgramStageInstance) IllegalQueryException(org.hisp.dhis.common.IllegalQueryException) EVENT_GEOMETRY(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_GEOMETRY) ArrayList(java.util.ArrayList) RelationshipParams(org.hisp.dhis.dxf2.events.RelationshipParams) Lists(com.google.common.collect.Lists) IdentifiableObjectManager(org.hisp.dhis.common.IdentifiableObjectManager) SlimPager(org.hisp.dhis.common.SlimPager) ImportConflicts(org.hisp.dhis.dxf2.importsummary.ImportConflicts) EventManager(org.hisp.dhis.dxf2.events.importer.EventManager) EVENT_ENROLLMENT_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_ENROLLMENT_ID) IdSchemes(org.hisp.dhis.common.IdSchemes) RelationshipService(org.hisp.dhis.dxf2.events.relationship.RelationshipService) DEFAULT_PAGE_SIZE(org.hisp.dhis.common.Pager.DEFAULT_PAGE_SIZE) ImportOptions(org.hisp.dhis.dxf2.common.ImportOptions) ImportSummaries(org.hisp.dhis.dxf2.importsummary.ImportSummaries) TrackedEntityInstanceService(org.hisp.dhis.trackedentity.TrackedEntityInstanceService) DebugUtils(org.hisp.dhis.commons.util.DebugUtils) ERROR(org.hisp.dhis.system.notification.NotificationLevel.ERROR) CodeGenerator(org.hisp.dhis.common.CodeGenerator) ProgramService(org.hisp.dhis.program.ProgramService) DateUtils(org.hisp.dhis.util.DateUtils) EVENT_PROGRAM_STAGE_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_PROGRAM_STAGE_ID) PAGER_META_KEY(org.hisp.dhis.dxf2.events.event.EventSearchParams.PAGER_META_KEY) Authorities(org.hisp.dhis.security.Authorities) Date(java.util.Date) WorkContextLoader(org.hisp.dhis.dxf2.events.importer.context.WorkContextLoader) OrganisationUnitService(org.hisp.dhis.organisationunit.OrganisationUnitService) EVENT_LAST_UPDATED_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_LAST_UPDATED_ID) ProgramStageInstanceService(org.hisp.dhis.program.ProgramStageInstanceService) NoteHelper(org.hisp.dhis.dxf2.events.NoteHelper) EVENT_PROGRAM_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_PROGRAM_ID) EVENT_DUE_DATE_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_DUE_DATE_ID) UserService(org.hisp.dhis.user.UserService) Collection(java.util.Collection) EventStatus(org.hisp.dhis.event.EventStatus) Collectors(java.util.stream.Collectors) QueryService(org.hisp.dhis.query.QueryService) EventRows(org.hisp.dhis.dxf2.events.report.EventRows) Objects(java.util.Objects) List(java.util.List) CollectionUtils.isNotEmpty(org.apache.commons.collections4.CollectionUtils.isNotEmpty) EventImporter(org.hisp.dhis.dxf2.events.importer.EventImporter) TrackerAccessManager(org.hisp.dhis.trackedentity.TrackerAccessManager) Cache(org.hisp.dhis.cache.Cache) EVENT_ORG_UNIT_NAME(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_ORG_UNIT_NAME) EVENT_CREATED_BY_USER_INFO_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_CREATED_BY_USER_INFO_ID) EVENT_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_ID) HashMap(java.util.HashMap) ObjectUtils.defaultIfNull(org.apache.commons.lang3.ObjectUtils.defaultIfNull) Program(org.hisp.dhis.program.Program) HashSet(java.util.HashSet) DataElement(org.hisp.dhis.dataelement.DataElement) WorkContext(org.hisp.dhis.dxf2.events.importer.context.WorkContext) Notifier(org.hisp.dhis.system.notification.Notifier) DbmsManager(org.hisp.dhis.dbms.DbmsManager) GridHeader(org.hisp.dhis.common.GridHeader) User(org.hisp.dhis.user.User) ImportStatus(org.hisp.dhis.dxf2.importsummary.ImportStatus) EVENT_ORG_UNIT_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_ORG_UNIT_ID) EVENT_LAST_UPDATED_BY_USER_INFO_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_LAST_UPDATED_BY_USER_INFO_ID) Collections.emptyMap(java.util.Collections.emptyMap) EVENT_DELETED(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_DELETED) Pager(org.hisp.dhis.common.Pager) Grid(org.hisp.dhis.common.Grid) OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) NotificationLevel(org.hisp.dhis.system.notification.NotificationLevel) EVENT_ATTRIBUTE_OPTION_COMBO_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_ATTRIBUTE_OPTION_COMBO_ID) CurrentUserService(org.hisp.dhis.user.CurrentUserService) CachingMap(org.hisp.dhis.commons.collection.CachingMap) Collections(java.util.Collections) EVENT_COMPLETED_BY_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_COMPLETED_BY_ID) EVENT_COMPLETED_DATE_ID(org.hisp.dhis.dxf2.events.event.EventSearchParams.EVENT_COMPLETED_DATE_ID) Transactional(org.springframework.transaction.annotation.Transactional) OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) User(org.hisp.dhis.user.User) Program(org.hisp.dhis.program.Program) EventDataValue(org.hisp.dhis.eventdatavalue.EventDataValue) IllegalQueryException(org.hisp.dhis.common.IllegalQueryException) DateUtils.getMediumDateString(org.hisp.dhis.util.DateUtils.getMediumDateString) EventDataValue(org.hisp.dhis.eventdatavalue.EventDataValue) CategoryOptionCombo(org.hisp.dhis.category.CategoryOptionCombo) Transactional(org.springframework.transaction.annotation.Transactional)

Example 22 with UID

use of org.hisp.dhis.dxf2.events.trackedentity.store.query.EventQuery.COLUMNS.UID in project dhis2-core by dhis2.

the class AbstractEventService method deleteEvent.

// -------------------------------------------------------------------------
// DELETE
// -------------------------------------------------------------------------
@Transactional
@Override
public ImportSummary deleteEvent(String uid) {
    boolean existsEvent = programStageInstanceService.programStageInstanceExists(uid);
    if (existsEvent) {
        ProgramStageInstance programStageInstance = programStageInstanceService.getProgramStageInstance(uid);
        List<String> errors = trackerAccessManager.canDelete(currentUserService.getCurrentUser(), programStageInstance, false);
        if (!errors.isEmpty()) {
            return new ImportSummary(ImportStatus.ERROR, errors.toString()).incrementIgnored();
        }
        programStageInstanceService.deleteProgramStageInstance(programStageInstance);
        if (programStageInstance.getProgramStage().getProgram().isRegistration()) {
            entityInstanceService.updateTrackedEntityInstance(programStageInstance.getProgramInstance().getEntityInstance());
        }
        ImportSummary importSummary = new ImportSummary(ImportStatus.SUCCESS, "Deletion of event " + uid + " was successful").incrementDeleted();
        importSummary.setReference(uid);
        return importSummary;
    } else {
        return new ImportSummary(ImportStatus.SUCCESS, "Event " + uid + " cannot be deleted as it is not present in the system").incrementIgnored();
    }
}
Also used : ImportSummary(org.hisp.dhis.dxf2.importsummary.ImportSummary) DateUtils.getMediumDateString(org.hisp.dhis.util.DateUtils.getMediumDateString) ProgramStageInstance(org.hisp.dhis.program.ProgramStageInstance) Transactional(org.springframework.transaction.annotation.Transactional)

Example 23 with UID

use of org.hisp.dhis.dxf2.events.trackedentity.store.query.EventQuery.COLUMNS.UID in project dhis2-core by dhis2.

the class AbstractEnrollmentService method deleteEnrollment.

private ImportSummary deleteEnrollment(String uid, Enrollment enrollment, ImportOptions importOptions) {
    ImportSummary importSummary = new ImportSummary();
    importOptions = updateImportOptions(importOptions);
    boolean existsEnrollment = programInstanceService.programInstanceExists(uid);
    if (existsEnrollment) {
        ProgramInstance programInstance = programInstanceService.getProgramInstance(uid);
        if (enrollment != null) {
            importSummary.setReference(uid);
            importSummary.setEvents(handleEvents(enrollment, programInstance, importOptions));
        }
        if (importOptions.getUser() != null) {
            isAllowedToDelete(importOptions.getUser(), programInstance, importSummary);
            if (importSummary.hasConflicts()) {
                importSummary.setStatus(ImportStatus.ERROR);
                importSummary.setReference(programInstance.getUid());
                importSummary.incrementIgnored();
                return importSummary;
            }
        }
        programInstanceService.deleteProgramInstance(programInstance);
        teiService.updateTrackedEntityInstance(programInstance.getEntityInstance());
        importSummary.setReference(uid);
        importSummary.setStatus(ImportStatus.SUCCESS);
        importSummary.setDescription("Deletion of enrollment " + uid + " was successful");
        return importSummary.incrementDeleted();
    } else {
        // If I am here, it means that the item is either already deleted or
        // it is not present in the system at all.
        importSummary.setStatus(ImportStatus.SUCCESS);
        importSummary.setDescription("Enrollment " + uid + " cannot be deleted as it is not present in the system");
        return importSummary.incrementIgnored();
    }
}
Also used : ImportSummary(org.hisp.dhis.dxf2.importsummary.ImportSummary) ProgramInstance(org.hisp.dhis.program.ProgramInstance)

Example 24 with UID

use of org.hisp.dhis.dxf2.events.trackedentity.store.query.EventQuery.COLUMNS.UID in project dhis2-core by dhis2.

the class NoteSupplier method get.

@Override
public Map<String, Note> get(ImportOptions importOptions, List<Event> events) {
    Map<String, Note> persistableNotes = new HashMap<>();
    // 
    // Collects all the notes' UID
    // 
    // @formatter:off
    Set<String> notesUid = events.stream().map(Event::getNotes).flatMap(Collection::stream).map(Note::getNote).filter(Objects::nonNull).collect(Collectors.toSet());
    if (isNotEmpty(notesUid)) {
        final String sql = "select uid from trackedentitycomment where uid in  (:ids)";
        MapSqlParameterSource parameters = new MapSqlParameterSource();
        parameters.addValue("ids", notesUid);
        List<String> foundNotes = new ArrayList<>();
        // 
        // finds all the notes that EXIST in the DB (by uid)
        // 
        jdbcTemplate.query(sql, parameters, (ResultSet rs) -> {
            while (rs.next()) {
                foundNotes.add(rs.getString("uid"));
            }
        });
        for (Event event : events) {
            // @formatter:off
            List<Note> eventNotes = event.getNotes().stream().filter(u -> !foundNotes.contains(u.getNote())).collect(Collectors.toList());
            // @formatter:on
            if (isNotEmpty(eventNotes)) {
                persistableNotes.putAll(eventNotes.stream().collect(Collectors.toMap(Note::getNote, Function.identity())));
            }
        }
    }
    return persistableNotes;
}
Also used : CollectionUtils.isNotEmpty(org.apache.commons.collections.CollectionUtils.isNotEmpty) Collection(java.util.Collection) NamedParameterJdbcTemplate(org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate) Set(java.util.Set) HashMap(java.util.HashMap) MapSqlParameterSource(org.springframework.jdbc.core.namedparam.MapSqlParameterSource) Function(java.util.function.Function) Collectors(java.util.stream.Collectors) ImportOptions(org.hisp.dhis.dxf2.common.ImportOptions) Event(org.hisp.dhis.dxf2.events.event.Event) ArrayList(java.util.ArrayList) Objects(java.util.Objects) Note(org.hisp.dhis.dxf2.events.event.Note) List(java.util.List) Component(org.springframework.stereotype.Component) ResultSet(java.sql.ResultSet) Map(java.util.Map) MapSqlParameterSource(org.springframework.jdbc.core.namedparam.MapSqlParameterSource) HashMap(java.util.HashMap) Note(org.hisp.dhis.dxf2.events.event.Note) ArrayList(java.util.ArrayList) ResultSet(java.sql.ResultSet) Event(org.hisp.dhis.dxf2.events.event.Event)

Example 25 with UID

use of org.hisp.dhis.dxf2.events.trackedentity.store.query.EventQuery.COLUMNS.UID in project dhis2-core by dhis2.

the class OrganisationUnitSupplier method fetchOu.

private Map<String, OrganisationUnit> fetchOu(IdScheme idScheme, Set<String> orgUnitUids, Multimap<String, String> orgUnitToEvent) {
    String sql = "select ou.organisationunitid, ou.uid, ou.code, ou.name, ou.path, ou.hierarchylevel ";
    if (idScheme.isAttribute()) {
        // 
        // Attribute IdScheme handling: use Postgres JSONB custom clauses to
        // query the
        // "attributvalues" column
        // 
        // The column is expected to contain a JSON structure like so:
        // 
        // {"ie9wfkGw8GX": {"value": "Some value", "attribute": {"id":
        // "ie9wfkGw8GX"}}}
        // 
        // The 'ie9wfkGw8GX' uid is the attribute identifier
        // 
        final String attribute = idScheme.getAttribute();
        sql += ",attributevalues->'" + attribute + "'->>'value' as " + ATTRIBUTESCHEME_COL + " from organisationunit ou where ou.attributevalues#>>'{" + attribute + ",value}' in (:ids)";
    } else {
        sql += "from organisationunit ou where ou." + IdSchemeUtils.getColumnNameByScheme(idScheme, "organisationunitid") + " in (:ids)";
    }
    MapSqlParameterSource parameters = new MapSqlParameterSource();
    parameters.addValue("ids", orgUnitUids);
    return jdbcTemplate.query(sql, parameters, rs -> {
        Map<String, OrganisationUnit> results = new HashMap<>();
        while (rs.next()) {
            OrganisationUnit ou = mapFromResultSet(rs);
            try {
                for (String event : orgUnitToEvent.get(idScheme.isAttribute() ? rs.getString(ATTRIBUTESCHEME_COL) : getIdentifierBasedOnIdScheme(ou, idScheme))) {
                    results.put(event, ou);
                }
            } catch (Exception e) {
                throw new UnrecoverableImportException(e);
            }
        }
        return results;
    });
}
Also used : OrganisationUnit(org.hisp.dhis.organisationunit.OrganisationUnit) UnrecoverableImportException(org.hisp.dhis.dxf2.events.event.UnrecoverableImportException) MapSqlParameterSource(org.springframework.jdbc.core.namedparam.MapSqlParameterSource) HashMap(java.util.HashMap) UnrecoverableImportException(org.hisp.dhis.dxf2.events.event.UnrecoverableImportException) SQLException(java.sql.SQLException)

Aggregations

WebMessageException (org.hisp.dhis.dxf2.webmessage.WebMessageException)92 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)52 Event (org.hisp.dhis.dxf2.events.event.Event)39 OrganisationUnit (org.hisp.dhis.organisationunit.OrganisationUnit)37 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)34 ResponseStatus (org.springframework.web.bind.annotation.ResponseStatus)29 GetMapping (org.springframework.web.bind.annotation.GetMapping)28 User (org.hisp.dhis.user.User)23 Test (org.junit.jupiter.api.Test)21 HashMap (java.util.HashMap)19 ImportSummary (org.hisp.dhis.dxf2.importsummary.ImportSummary)19 UpdateAccessDeniedException (org.hisp.dhis.hibernate.exception.UpdateAccessDeniedException)19 InputStream (java.io.InputStream)18 PreAuthorize (org.springframework.security.access.prepost.PreAuthorize)18 ArrayList (java.util.ArrayList)17 MetadataImportParams (org.hisp.dhis.dxf2.metadata.MetadataImportParams)17 List (java.util.List)16 BaseIdentifiableObject (org.hisp.dhis.common.BaseIdentifiableObject)16 DataElement (org.hisp.dhis.dataelement.DataElement)15 ImportOptions (org.hisp.dhis.dxf2.common.ImportOptions)15