@GET("/status/get-undeployed-services/avaiability/{availability}/time-unit/{timeUnit}/duration/{duration}") public List<EnvironmentServiceGroupMap> getUndeployedServicesByAvailability(String availability, String timeUnit, int duration) { TimeUnit timeUnitEnum; try { timeUnitEnum = TimeUnit.valueOf(timeUnit); } catch (IllegalArgumentException | NullPointerException e) { throw new IllegalArgumentException("Please pass timeUnit parameter in TimeUnit type template", e.getCause()); } return serviceStatusHandler.getUndeployedServicesByAvailability(availability, timeUnitEnum, duration); } }
@LoggedIn @GET("/blocker-definition/unconditional/regions/{regionsCsv}/environment-types/{environmentTypesCsv}") public List<Integer> getUnconditionalBlockersByEnvironmentTypeAndRegion(String regionsCsv, String environmentTypesCsv) { Iterable<String> regions = Splitter.on(CSV_DELIMITER).omitEmptyStrings().trimResults().split(regionsCsv); Iterable<String> environmentTypes = Splitter.on(CSV_DELIMITER).omitEmptyStrings().trimResults().split(environmentTypesCsv); return blockerDefinitionDao.getUnconditionalBlockersByEnvironmentTypeAndRegion(Lists.newArrayList(regions), Lists.newArrayList(environmentTypes)); }
@LoggedIn @GET("/deployable-version/multi-service/{serviceIdsCsv}") public List<DeployableVersion> getDeployableVersionForMultiServices(String serviceIdsCsv) { Iterable<String> serviceIds = Splitter.on(",").omitEmptyStrings().trimResults().split(serviceIdsCsv); return deployableVersionDao.getDeployableVersionForMultiServices(Joiner.on(",").join(serviceIds), Iterables.size(serviceIds)); }
@LoggedIn @GET("/environment") public List<Environment> getEnvironments() { return environmentDao.getAllEnvironments().stream() .map(this::maskCredentials) .collect(Collectors.toList()); }
@LoggedIn @GET("/blocker-definition") public List<BlockerDefinition> getAllBlockerDefinitions() { return blockerDefinitionDao.getAllBlockerDefinitions(); }
@LoggedIn @GET("/deployable-version/sha/{sha}/service/{serviceId}") public DeployableVersion getDeployableVersionFromSha(String sha, int serviceId) { return deployableVersionDao.getDeployableVersionFromSha(sha, serviceId); }
@LoggedIn @GET("/group/environment/{environmentId}/service/{serviceId}") public List<Group> getGroupsPerServiceAndEnvironment(int environmentId, int serviceId) { return groupDao.getGroupsPerServiceAndEnvironment(serviceId, environmentId); }
@Administrator @GET("/deployment-roles") public List<DeploymentRole> getAllDeploymentRoles(Req req) { return deploymentRoleDao.getAllDeploymentRoles(); }
@LoggedIn @GET("/deployment/{id}") public Deployment getDeployment(int id) { return deploymentDao.getDeployment(id); }
@LoggedIn @GET("/blocker-definition/{id}") public BlockerDefinition getBlockerDefinition(int id) { return blockerDefinitionDao.getBlockerDefinition(id); }
@LoggedIn @GET("/deployable-version") public List<DeployableVersion> getAllDeployableVersion() { return deployableVersionDao.getAllDeployableVersions(); }
@LoggedIn @GET("/deployable-version/latest/service/{serviceId}") public List<DeployableVersion> getLatestDeployableVersionsByServiceId(int serviceId) { return deployableVersionDao.getLatestDeployableVersionsByServiceId(serviceId, LATEST_DEPLOYABLE_VERSIONS_COUNT); }
@Administrator @GET("/deployment-permission/{id}") public DeploymentPermission getDeploymentPermission(int id, Req req) { return deploymentPermissionDao.getDeploymentPermission(id); }
@LoggedIn @GET("/deployment") public List<Deployment> getAllDeployments() { return deploymentDao.getAllDeployments(); }
@LoggedIn @GET("/running-deployments") public List<Deployment> getRunningDeployments() { return deploymentDao.getAllRunningDeployments(); }
@LoggedIn @GET("/deployable-version/{id}") public DeployableVersion getDeployableVersion(int id) { return deployableVersionDao.getDeployableVersion(id); }
@Administrator @GET("/deployment-permission") public List<DeploymentPermission> getAllDeploymentPermissions(Req req) { return deploymentPermissionDao.getAllDeploymentPermissions(); }
@LoggedIn @GET("/running-and-just-finished-deployments") public List<Deployment> getRunningAndJustFinishedDeployments() { return deploymentDao.getRunningAndJustFinishedDeployments(); }
@LoggedIn @GET("/environment/{id}") public Environment getEnvironment(int id) { Environment gotEnvironment = environmentDao.getEnvironment(id); gotEnvironment = maskCredentials(gotEnvironment); return gotEnvironment; }
@LoggedIn @Transactional @GET("/environments-stack/{stackId}") public EnvironmentsStack getEnvironmentsStack(int stackId) { EnvironmentsStack environmentsStack = stackDao.getEnvironmentsStack(stackId); environmentsStack.setEnvironments(environmentsStackDao.getEnvironments(stackId)); return environmentsStack; }