Skip to content

Commit

Permalink
addind of mapper for report export configuration type
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed May 29, 2020
1 parent facaf14 commit dc3013a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
@@ -0,0 +1,29 @@
/*
* Copyright (c) 2010-2020 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/

package com.evolveum.midpoint.repo.sql.helpers.mapper;

import com.evolveum.midpoint.repo.sql.data.common.enums.RExportType;
import com.evolveum.midpoint.repo.sql.helpers.modify.MapperContext;
import com.evolveum.midpoint.repo.sql.util.RUtil;
import com.evolveum.midpoint.xml.ns._public.common.common_3.ExportConfigurationType;

import javax.xml.namespace.QName;

/**
* @author lskublik
*/
public class ReportExportConfigurationMapper implements Mapper<ExportConfigurationType, RExportType> {

@Override
public RExportType map(ExportConfigurationType input, MapperContext context) {
if (input.getType() == null) {
return null;
}
return RExportType.valueOf(input.getType().name());
}
}
Expand Up @@ -18,6 +18,7 @@
import com.evolveum.midpoint.repo.sql.data.common.container.*;
import com.evolveum.midpoint.repo.sql.data.common.dictionary.ExtItemDictionary;
import com.evolveum.midpoint.repo.sql.data.common.embedded.*;
import com.evolveum.midpoint.repo.sql.data.common.enums.RExportType;
import com.evolveum.midpoint.repo.sql.data.common.enums.SchemaEnum;
import com.evolveum.midpoint.repo.sql.helpers.BaseHelper;
import com.evolveum.midpoint.repo.sql.helpers.mapper.*;
Expand Down Expand Up @@ -60,6 +61,7 @@ public class PrismEntityMapper {
MAPPERS.put(new Key(MetadataType.class, Metadata.class), new MetadataMapper());

MAPPERS.put(new Key(byte[].class, RFocusPhoto.class), new RFocusPhotoMapper());
MAPPERS.put(new Key(ExportConfigurationType.class, RExportType.class), new ReportExportConfigurationMapper());
}

@Autowired private RepositoryService repositoryService;
Expand Down

0 comments on commit dc3013a

Please sign in to comment.