mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 07:25:44 +01:00
Implements Hg Config Sub Resources
This commit is contained in:
@@ -38,6 +38,9 @@ package sonia.scm.web;
|
||||
import com.google.inject.servlet.ServletModule;
|
||||
import org.mapstruct.factory.Mappers;
|
||||
import sonia.scm.api.v2.resources.HgConfigDtoToHgConfigMapper;
|
||||
import sonia.scm.api.v2.resources.HgConfigInstallationsToDtoMapper;
|
||||
import sonia.scm.api.v2.resources.HgConfigPackageCollectionToDtoMapper;
|
||||
import sonia.scm.api.v2.resources.HgConfigPackageToDtoMapper;
|
||||
import sonia.scm.api.v2.resources.HgConfigToHgConfigDtoMapper;
|
||||
import sonia.scm.installer.HgPackageReader;
|
||||
import sonia.scm.plugin.Extension;
|
||||
@@ -74,6 +77,9 @@ public class HgServletModule extends ServletModule
|
||||
|
||||
bind(HgConfigDtoToHgConfigMapper.class).to(Mappers.getMapper(HgConfigDtoToHgConfigMapper.class).getClass());
|
||||
bind(HgConfigToHgConfigDtoMapper.class).to(Mappers.getMapper(HgConfigToHgConfigDtoMapper.class).getClass());
|
||||
bind(HgConfigPackageToDtoMapper.class).to(Mappers.getMapper(HgConfigPackageToDtoMapper.class).getClass());
|
||||
bind(HgConfigPackageCollectionToDtoMapper.class);
|
||||
bind(HgConfigInstallationsToDtoMapper.class);
|
||||
|
||||
// bind servlets
|
||||
serve(MAPPING_HOOK).with(HgHookCallbackServlet.class);
|
||||
|
||||
@@ -2,7 +2,11 @@ package sonia.scm.web;
|
||||
|
||||
|
||||
public class HgVndMediaType {
|
||||
public static final String HG_CONFIG = VndMediaType.PREFIX + "hgConfig" + VndMediaType.SUFFIX;
|
||||
private static final String PREFIX = VndMediaType.PREFIX + "hgConfig";
|
||||
|
||||
public static final String CONFIG = PREFIX + VndMediaType.SUFFIX;
|
||||
public static final String PACKAGES = PREFIX + "-packages" + VndMediaType.SUFFIX;
|
||||
public static final String INSTALLATIONS = PREFIX + "-installation" + VndMediaType.SUFFIX;
|
||||
|
||||
private HgVndMediaType() {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user