use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class BlueprintController method getPrivates.
@Override
public Set<BlueprintResponse> getPrivates() {
IdentityUser user = authenticatedUserService.getCbUser();
Set<Blueprint> blueprints = blueprintService.retrievePrivateBlueprints(user);
return getBlueprintResponses(user, blueprints);
}
use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class BlueprintController method getPublic.
@Override
public BlueprintResponse getPublic(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
Blueprint blueprint = blueprintService.getPublicBlueprint(name, user);
return conversionService.convert(blueprint, BlueprintResponse.class);
}
use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class BlueprintController method getPrivate.
@Override
public BlueprintResponse getPrivate(String name) {
IdentityUser user = authenticatedUserService.getCbUser();
Blueprint blueprint = blueprintService.getPrivateBlueprint(name, user);
return conversionService.convert(blueprint, BlueprintResponse.class);
}
use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class CloudbreakEventController method getStructuredEventsForStack.
private List<StructuredEvent> getStructuredEventsForStack(Long stackId) {
IdentityUser identityUser = authenticatedUserService.getCbUser();
Map<String, Long> resourceIds = Maps.newHashMap();
resourceIds.put("STACK", stackId);
resourceIds.put("stacks", stackId);
return structuredEventService.getEventsForUser(identityUser.getUserId(), Arrays.asList("REST", "FLOW", "NOTIFICATION"), resourceIds);
}
use of com.sequenceiq.cloudbreak.common.model.user.IdentityUser in project cloudbreak by hortonworks.
the class CloudbreakUsageController method getAccount.
@Override
public List<CloudbreakUsageJson> getAccount(Long since, Long filterEndDate, String userId, String cloud, String zone) {
IdentityUser user = authenticatedUserService.getCbUser();
CbUsageFilterParameters params = new Builder().setAccount(user.getAccount()).setOwner(userId).setSince(since).setCloud(cloud).setRegion(zone).setFilterEndDate(filterEndDate).build();
return cloudbreakUsagesFacade.getUsagesFor(params);
}
Aggregations