Search in sources :

Example 86 with IdentityUser

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);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) ClusterResponse(com.sequenceiq.cloudbreak.api.model.ClusterResponse) AutoscaleClusterResponse(com.sequenceiq.cloudbreak.api.model.AutoscaleClusterResponse) Stack(com.sequenceiq.cloudbreak.domain.Stack)

Example 87 with IdentityUser

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);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) ConstraintTemplate(com.sequenceiq.cloudbreak.domain.ConstraintTemplate)

Example 88 with IdentityUser

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);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) ConstraintTemplate(com.sequenceiq.cloudbreak.domain.ConstraintTemplate)

Example 89 with IdentityUser

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);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) Credential(com.sequenceiq.cloudbreak.domain.Credential)

Example 90 with IdentityUser

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);
}
Also used : IdentityUser(com.sequenceiq.cloudbreak.common.model.user.IdentityUser) Credential(com.sequenceiq.cloudbreak.domain.Credential)

Aggregations

IdentityUser (com.sequenceiq.cloudbreak.common.model.user.IdentityUser)133 Test (org.junit.Test)14 Stack (com.sequenceiq.cloudbreak.domain.Stack)13 UserFilterField (com.sequenceiq.cloudbreak.common.service.user.UserFilterField)9 Async (org.springframework.scheduling.annotation.Async)9 Blueprint (com.sequenceiq.cloudbreak.domain.Blueprint)8 Credential (com.sequenceiq.cloudbreak.domain.Credential)8 FlexSubscription (com.sequenceiq.cloudbreak.domain.FlexSubscription)8 Cluster (com.sequenceiq.cloudbreak.domain.Cluster)7 LdapConfig (com.sequenceiq.cloudbreak.domain.LdapConfig)7 ProxyConfig (com.sequenceiq.cloudbreak.domain.ProxyConfig)7 ImageCatalog (com.sequenceiq.cloudbreak.domain.ImageCatalog)6 RDSConfig (com.sequenceiq.cloudbreak.domain.RDSConfig)6 Before (org.junit.Before)6 TestingAuthenticationToken (org.springframework.security.authentication.TestingAuthenticationToken)6 UpdateStackJson (com.sequenceiq.cloudbreak.api.model.UpdateStackJson)5 Template (com.sequenceiq.cloudbreak.domain.Template)5 ConstraintTemplate (com.sequenceiq.cloudbreak.domain.ConstraintTemplate)4 Network (com.sequenceiq.cloudbreak.domain.Network)4 Recipe (com.sequenceiq.cloudbreak.domain.Recipe)4