Class FsAcls

java.lang.Object
com.norconex.crawler.fs.fetch.acl.FsAcls

public final class FsAcls extends Object
Helpers the file-system fetchers share to write a document's Acl.
  • Method Details

    • write

      public static Acl write(@NonNull @NonNull Properties meta, @NonNull @NonNull AclFetchMode mode, List<AclLevel> levels, List<AclEntry> owners, Map<String,Object> nativeData, List<String> unread)
      Writes a document's ACL.
      Parameters:
      meta - the document's metadata
      mode - how permissions were asked for
      levels - the levels, in order
      owners - the owners
      nativeData - the source's own entries, or null
      unread - what could not be read, making the ACL partial when not empty
      Returns:
      the ACL written
    • writeNone

      public static Acl writeNone(@NonNull @NonNull Properties meta, @NonNull @NonNull AclFetchMode mode, String why)
      Writes the ACL of a document whose permissions could not be read at all. A committer will not send it.
      Parameters:
      meta - the document's metadata
      mode - how permissions were asked for
      why - why, in a few words
      Returns:
      the ACL written
    • unixDir

      public static String unixDir(String host)
      The directory of the users and groups of a Unix host.
      Parameters:
      host - the host name
      Returns:
      unix:<host>
    • localHostName

      public static String localHostName()
      The name of this host, for the directory of local users and groups.
      Returns:
      the host name