@Override
  protected Resource toResource(PrivilegeEntity privilegeEntity,
                                Map<Long, UserEntity> userEntities,
                                Map<Long, GroupEntity> groupEntities,
                                Map<Long, PermissionEntity> roleEntities,
                                Map<Long, ClusterEntity> resourceEntities,
                                Set<String> requestedIds) {

    Resource resource = super.toResource(privilegeEntity, userEntities, groupEntities, roleEntities, resourceEntities, requestedIds);
    if (resource != null) {
      ClusterEntity clusterEntity = resourceEntities.get(privilegeEntity.getResource().getId());
      setResourceProperty(resource, CLUSTER_NAME, clusterEntity.getClusterName(), requestedIds);
    }
    return resource;
  }
Static initialization.

@param dao  the cluster data access object
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterPrivilegeResourceProvider.java