private Resource toResource(PermissionEntity entity, Set<String> requestedIds) {
    Resource resource = new ResourceImpl(Resource.Type.Permission);

    setResourceProperty(resource, PERMISSION_ID_PROPERTY_ID, entity.getId(), requestedIds);
    setResourceProperty(resource, PERMISSION_NAME_PROPERTY_ID, entity.getPermissionName(), requestedIds);
    setResourceProperty(resource, PERMISSION_LABEL_PROPERTY_ID, entity.getPermissionLabel(), requestedIds);
    setResourceProperty(resource, RESOURCE_NAME_PROPERTY_ID, entity.getResourceType().getName(), requestedIds);
    setResourceProperty(resource, SORT_ORDER_PROPERTY_ID, entity.getSortOrder(), requestedIds);

    return resource;
  }
Static initialization.

@param dao  permission data access object
ambari-server/src/main/java/org/apache/ambari/server/controller/internal/PermissionResourceProvider.java