use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class ClusterV1Controller method getPublic.
@Override
public ClusterResponse getPublic(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
Stack stack = stackService.getPublicStack(name, user);
ClusterResponse cluster = clusterService.retrieveClusterForCurrentUser(stack.getId(), ClusterResponse.class);
String clusterJson = clusterService.getClusterJson(stack.getAmbariIp(), stack.getId());
return clusterService.getClusterResponse(cluster, clusterJson);
}
use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class ConstraintTemplateController method getPrivate.
@Override
public ConstraintTemplateResponse getPrivate(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
ConstraintTemplate template = constraintTemplateService.getPrivateTemplate(name, user);
return convert(template);
}
use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class ConstraintTemplateController method getPublics.
@Override
public Set<ConstraintTemplateResponse> getPublics() {
IdentityUser user = authenticatedUserService.getCbUser();
Set<ConstraintTemplate> templates = constraintTemplateService.retrieveAccountConstraintTemplates(user);
return convert(templates);
}
use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class CredentialController method getPublic.
@Override
public CredentialResponse getPublic(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
Credential credentials = credentialService.getPublicCredential(name, user);
return convert(credentials);
}
use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class CredentialController method getPrivates.
@Override
public Set<CredentialResponse> getPrivates() {
IdentityUser user = authenticatedUserService.getCbUser();
Set<Credential> credentials = credentialService.retrievePrivateCredentials(user);
return convertCredentials(credentials);
}
Aggregations