NotesConnectorDocument document = new NotesConnectorDocument(
connectorSession, session, connectorDatabase);
document.setCrawlDoc("unid", crawlDoc);
// Check defaults.
Principal principal =
getFirstPrincipal(document, SpiConstants.PROPNAME_ACLUSERS);
assertEquals(new Principal(PrincipalType.UNKNOWN,
connector.getGlobalNamespace(), "jsmith",
CaseSensitivityType.EVERYTHING_CASE_INSENSITIVE), principal);
principal = getFirstPrincipal(document, SpiConstants.PROPNAME_ACLGROUPS);
assertEquals(new Principal(PrincipalType.UNQUALIFIED,
connector.getLocalNamespace(), "Domino%2Freadergroup",
CaseSensitivityType.EVERYTHING_CASE_INSENSITIVE), principal);
// Change usernames to local namespace. Groups should stay local.
try {
connector.setGsaNamesAreGlobal(false);
document =
new NotesConnectorDocument(connectorSession, session, connectorDatabase);
document.setCrawlDoc("unid", crawlDoc);
principal = getFirstPrincipal(document, SpiConstants.PROPNAME_ACLUSERS);
assertEquals(new Principal(PrincipalType.UNQUALIFIED,
connector.getLocalNamespace(), "jsmith",
CaseSensitivityType.EVERYTHING_CASE_INSENSITIVE), principal);
principal = getFirstPrincipal(document, SpiConstants.PROPNAME_ACLGROUPS);
assertEquals(new Principal(PrincipalType.UNQUALIFIED,
connector.getLocalNamespace(), "Domino%2Freadergroup",
CaseSensitivityType.EVERYTHING_CASE_INSENSITIVE), principal);
} finally {
connector.setGsaNamesAreGlobal(true);
}