class AttributeDelegator extends BaseDelegator implements IAttributeDelegator {

    List<IFileSpec> buildSetFileAttributesFileSpecsFromCommandResultMaps(
            @Nullable final List<Map<String, Object>> resultMaps,
            @Nonnull final Function<Map<String, Object>, IFileSpec> handle)
            throws RequestException {

        List<IFileSpec> resultList = new ArrayList<>();
        if (nonNull(resultMaps)) {
            List<String> filesSeen = new ArrayList<>();
            for (Map<String, Object> map : resultMaps) {
                IFileSpec spec = handle.apply(map);
                if (spec.getOpStatus() == VALID) {
                    String file = spec.getAnnotatedPathString(DEPOT);
                    if (isNotBlank(file)) {
                        if (!filesSeen.contains(file)) {
                            filesSeen.add(file);
                            resultList.add(spec);
                        }
                    }
                } else {
                    resultList.add(spec);
                }
            }
        }
        return resultList;
    }

    public  AttributeDelegator(IOptionsServer server);

}