use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class RecipeController method getPublic.
@Override
public RecipeResponse getPublic(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
Recipe recipe = recipeService.getPublicRecipe(name, user);
return conversionService.convert(recipe, RecipeResponse.class);
}
use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class RecipeController method getPrivate.
@Override
public RecipeResponse getPrivate(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
Recipe recipe = recipeService.getPrivateRecipe(name, user);
return conversionService.convert(recipe, RecipeResponse.class);
}
use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class SecurityGroupController method getPrivate.
@Override
public SecurityGroupResponse getPrivate(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
SecurityGroup securityGroup = securityGroupService.getPrivateSecurityGroup(name, user);
return convert(securityGroup);
}
use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class ClusterV1Controller method post.
@Override
public ClusterResponse post(Long stackId, ClusterRequest request) throws Exception {
IdentityUser user = authenticatedUserService.getCbUser();
Stack stack = stackService.getByIdWithLists(stackId);
clusterCreationSetupService.validate(request, stack, user);
Cluster cluster = clusterCreationSetupService.prepare(request, stack, user);
return conversionService.convert(cluster, ClusterResponse.class);
}
use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class ClusterV1Controller method getPrivate.
@Override
public ClusterResponse getPrivate(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
Stack stack = stackService.getPrivateStack(name, user);
ClusterResponse cluster = clusterService.retrieveClusterForCurrentUser(stack.getId(), ClusterResponse.class);
String clusterJson = clusterService.getClusterJson(stack.getAmbariIp(), stack.getId());
return clusterService.getClusterResponse(cluster, clusterJson);
}
Aggregations