@Override
public Property findProperty(Document source, String name)
throws RepositoryException {
if (SpiConstants.PROPNAME_DOCUMENTTYPE.equals(name)) {
return new SimpleProperty(Value.getStringValue(
DocumentType.ACL.toString()));
} else if (SpiConstants.PROPNAME_FRAGMENT.equals(name)) {
return new SimpleProperty(Value.getStringValue(EXTRACTED_ACL_FRAGMENT));
} else if (SpiConstants.PROPNAME_ACLINHERITANCETYPE.equals(name)) {
String inheritanceType = Value.getSingleValueString(source, name);
if (AclInheritanceType.AND_BOTH_PERMIT.toString().equals(inheritanceType)) {
throw new SkippedDocumentException(
"Extracting 'and-both-permit' ACLs is not supported.");
}
return new SimpleProperty(Value.getStringValue(
Strings.isNullOrEmpty(inheritanceType) ?
AclInheritanceType.PARENT_OVERRIDES.toString() : inheritanceType));
} else {
return source.findProperty(name);
}