class Acl {

  public Item applyTo(Item item) {
    checkNotNull(item, "Item cannot be null.");
    ItemAcl itemAcl =
        new ItemAcl()
            .setReaders(getClonedCopy(readers, Collectors.toList()))
            .setDeniedReaders(getClonedCopy(deniedReaders, Collectors.toList()))
            .setOwners(getClonedCopy(owners, Collectors.toList()));

    if (!Strings.isNullOrEmpty(inheritFrom)) {
      itemAcl
          .setInheritAclFrom(fragmentId(inheritFrom, inheritFromFragment))
          .setAclInheritanceType(inheritType.getCommonForm());
    }
    item.setAcl(itemAcl);
    return item;
  }

  private  Acl(Builder builder);

}