public class AclPropertyFilter extends AbstractDocumentFilter
Document
filter that forces the SpiConstants.CaseSensitivityType
field
for all ACL Principals
supplied by the connector to be set to a specified value.
This will over-ride any SpiConstants.CaseSensitivityType
that may have been set
by the connector, and supply one if none was set by the connector.
Example documentFilters.xml
Configurations:
The following example forces all ACL Principals for all fed documents to be considered case-insensitive.
<!-- Force case-insensitive ACLs. -->
<bean id="CaseInsensitiveACLs"
class="com.google.enterprise.connector.util.filter.AclPropertyFilter">
<property name="caseSensitivityType" value="everything-case-insensitive"/>
</bean>
Constructor and Description |
---|
AclPropertyFilter() |
Modifier and Type | Method and Description |
---|---|
Property |
findProperty(Document source,
java.lang.String name)
Finds a
Property by name . |
void |
setCaseSensitivityType(java.lang.String caseSensitivityType)
Sets the
SpiConstants.CaseSensitivityType to be used for all ACL
Principals
supplied by the connector. |
void |
setOverwriteUserDomain(boolean overwriteUserDomain)
Sets the overwrite value flag.
|
void |
setUserDomain(java.lang.String userDomain)
Sets the domain for users for ACL Principals.
|
getPropertyNames, getPropertyValues, newDocumentFilter, toString
public void setCaseSensitivityType(java.lang.String caseSensitivityType)
SpiConstants.CaseSensitivityType
to be used for all ACL
Principals
supplied by the connector.caseSensitivityType
- a String representation of a
SpiConstants.CaseSensitivityType
; i.e. everything-case-sensitive
or everything-case-insensitive
.public void setUserDomain(java.lang.String userDomain)
userDomain
- the domain name to set for user principals.public void setOverwriteUserDomain(boolean overwriteUserDomain)
overwriteUserDomain
- the overwrite flag. Overwrites the existing
domain values if true, or preserves existing domain values
if false.public Property findProperty(Document source, java.lang.String name) throws RepositoryException
Property
by name
. If the requested property is
ACL property, then checks for case sensitivity type and modifies the value
if different than specified in filter. Returns ACL property with modified
values.
findProperty
in class AbstractDocumentFilter
source
- the source Document
for this filtername
- the name of the property to findnull
otherwiseRepositoryException
- if a repository access error occursRepositoryDocumentException
- if a document has fatal
processing errors