website.automate.teamcity.server.web.mapper.ProjectResponseMapper Maven / Gradle / Ivy
package website.automate.teamcity.server.web.mapper;
import website.automate.teamcity.server.io.model.ProjectSerializable;
import website.automate.teamcity.server.support.Mapper;
import website.automate.teamcity.server.web.model.ProjectResponse;
public class ProjectResponseMapper extends Mapper {
private static final ProjectResponseMapper INSTANCE = new ProjectResponseMapper();
private final ScenarioResponseMapper scenarioMapper = ScenarioResponseMapper.getInstance();
public static ProjectResponseMapper getInstance() {
return INSTANCE;
}
@Override
public ProjectResponse map(ProjectSerializable source) {
ProjectResponse target = new ProjectResponse();
target.setId(source.getId());
target.setTitle(source.getTitle());
target.setScenarios(scenarioMapper.safeMapCollection(source.getScenarios()));
return target;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy