Class FsAcls
java.lang.Object
com.norconex.crawler.fs.fetch.acl.FsAcls
Helpers the file-system fetchers share to write a document's
Acl.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classLogs warnings once per crawl rather than once per document. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringThe name of this host, for the directory of local users and groups.static StringThe directory of the users and groups of a Unix host.static Aclwrite(@NonNull Properties meta, @NonNull AclFetchMode mode, List<AclLevel> levels, List<AclEntry> owners, Map<String, Object> nativeData, List<String> unread) Writes a document's ACL.static AclwriteNone(@NonNull Properties meta, @NonNull AclFetchMode mode, String why) Writes the ACL of a document whose permissions could not be read at all.
-
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 metadatamode- how permissions were asked forlevels- the levels, in orderowners- the ownersnativeData- the source's own entries, ornullunread- 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 metadatamode- how permissions were asked forwhy- why, in a few words- Returns:
- the ACL written
-
unixDir
The directory of the users and groups of a Unix host.- Parameters:
host- the host name- Returns:
unix:<host>
-
localHostName
The name of this host, for the directory of local users and groups.- Returns:
- the host name
-