Search in sources :

Example 1 with AclUserDTO

use of io.hops.hopsworks.common.dao.kafka.AclUserDTO in project hopsworks by logicalclocks.

the class AclBuilder method buildAclUser.

public AclUserDTO buildAclUser(UriInfo uriInfo, Project project, String topicName) {
    AclUserDTO dto = new AclUserDTO();
    URI uri = getAclUserUri(uriInfo, project, topicName).build();
    dto.setHref(uri);
    List<AclUser> list = kafkaController.getTopicAclUsers(project, topicName);
    dto.setCount(Integer.toUnsignedLong(list.size()));
    list.forEach((aclUser) -> dto.addItem(build((AclUser) aclUser)));
    return dto;
}
Also used : AclUserDTO(io.hops.hopsworks.common.dao.kafka.AclUserDTO) AclUser(io.hops.hopsworks.common.dao.kafka.AclUser) URI(java.net.URI)

Example 2 with AclUserDTO

use of io.hops.hopsworks.common.dao.kafka.AclUserDTO in project hopsworks by logicalclocks.

the class AclBuilder method build.

private AclUserDTO build(AclUser aclUser) {
    AclUserDTO dto = new AclUserDTO();
    dto.setProjectName(aclUser.getProjectName());
    dto.setUserEmails(aclUser.getUserEmails());
    return dto;
}
Also used : AclUserDTO(io.hops.hopsworks.common.dao.kafka.AclUserDTO)

Aggregations

AclUserDTO (io.hops.hopsworks.common.dao.kafka.AclUserDTO)2 AclUser (io.hops.hopsworks.common.dao.kafka.AclUser)1 URI (java.net.URI)1