use of org.eclipse.che.api.core.model.project.SourceStorage in project che by eclipse.
the class ResourceManager method asDto.
private NewProjectConfigDto asDto(MutableProjectConfig config) {
final SourceStorage source = config.getSource();
final SourceStorageDto sourceStorageDto = dtoFactory.createDto(SourceStorageDto.class).withType(source.getType()).withLocation(source.getLocation()).withParameters(source.getParameters());
return dtoFactory.createDto(NewProjectConfigDto.class).withName(config.getName()).withPath(config.getPath()).withDescription(config.getDescription()).withSource(sourceStorageDto).withType(config.getType()).withMixins(config.getMixins()).withAttributes(config.getAttributes()).withOptions(config.getOptions());
}
use of org.eclipse.che.api.core.model.project.SourceStorage in project che by eclipse.
the class DtoConverter method asDto.
/** Converts {@link ProjectConfig} to {@link ProjectConfigDto}. */
public static ProjectConfigDto asDto(ProjectConfig projectCfg) {
final ProjectConfigDto projectConfigDto = newDto(ProjectConfigDto.class).withName(projectCfg.getName()).withDescription(projectCfg.getDescription()).withPath(projectCfg.getPath()).withType(projectCfg.getType()).withAttributes(projectCfg.getAttributes()).withMixins(projectCfg.getMixins());
final SourceStorage source = projectCfg.getSource();
if (source != null) {
projectConfigDto.withSource(newDto(SourceStorageDto.class).withLocation(source.getLocation()).withType(source.getType()).withParameters(source.getParameters()));
}
return projectConfigDto;
}
Aggregations