// Do path metadata
if (pathAttributeName != null && pathAttributeName.length() > 0)
{
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug("Meridio: Path attribute name is "+pathAttributeName);
RMDataSet partList;
int recordType = documentData.getDOCUMENTS()[0].getPROP_recordType();
if (recordType == 0 || recordType == 4 || recordType == 19)
partList = meridio_.getRecordPartList((int)docId, false, false);
else
partList = meridio_.getDocumentPartList((int)docId);
if (partList != null)
{
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug("Meridio: Document '"+new Long(docId).toString()+"' has a part list with "+Integer.toString(partList.getRm2vPart().length)+" values");
for (int k = 0; k < partList.getRm2vPart().length; k++)
{
repositoryDocument.addField(pathAttributeName,matchMap.translate(partList.getRm2vPart()[k].getParentTitlePath()));
}
}
else
{
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug("Meridio: Document '"+new Long(docId).toString()+"' has no part list, so no path attribute");
}
}
// Process acls. If there are forced acls, use those, otherwise get them from Meridio.
String [] allowAcls;
String [] denyAcls;
// forcedAcls will be null if security is off, or nonzero length if security is on but hard-wired
if (forcedAcls != null && forcedAcls.length == 0)
{
ACCESSCONTROL [] documentAcls = documentData.getACCESSCONTROL();
ArrayList allowAclsArrayList = new ArrayList();
ArrayList denyAclsArrayList = new ArrayList();
// Allow a broken authority to disable all Meridio documents, even if the document is 'wide open', because
// Meridio does not permit viewing of the document if the user does not exist (at least, I don't know of a way).
denyAclsArrayList.add(denyToken);
if (documentAcls != null)
{
for (int j = 0; j < documentAcls.length; j++)
{
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug(
"Object Id '" + documentAcls[j].getObjectId() + "' " +
"Object Type '" + documentAcls[j].getObjectType() + "' " +
"Permission '" + documentAcls[j].getPermission() + "' " +
"User Id '" + documentAcls[j].getUserId() + "' " +
"Group Id '" + documentAcls[j].getGroupId() + "'");
if (documentAcls[j].getPermission() == 0) // prohibit permission
{
if (documentAcls[j].getGroupId() > 0)
{
denyAclsArrayList.add("G" + documentAcls[j].getGroupId());
} else if (documentAcls[j].getUserId() > 0)
{
denyAclsArrayList.add("U" + documentAcls[j].getUserId());
}
}
else // read, amend or manage
{
if (documentAcls[j].getGroupId() > 0)
{
allowAclsArrayList.add("G" + documentAcls[j].getGroupId());
} else if (documentAcls[j].getUserId() > 0)
{
allowAclsArrayList.add("U" + documentAcls[j].getUserId());
}
}
}
}
DOCUMENTS document = documentData.getDOCUMENTS()[0];
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug("Document id '" + new Long(docId).toString() + "' is owned by owner id '" +
document.getPROP_ownerId() + "' having the owner name '" +
document.getPROP_ownerName() + "' Record Type is '" +
document.getPROP_recordType() + "'");
if (document.getPROP_recordType() == 4 ||
document.getPROP_recordType() == 19)
{
RMDataSet rmds = meridio_.getRecord((int)docId, false, false, false);
Rm2vRecord record = rmds.getRm2vRecord()[0];
if (Logging.connectors.isDebugEnabled())
Logging.connectors.debug("Record User Id Owner is '" + record.getOwnerID() +
"' Record Group Owner Id is '" + record.getGroupOwnerID() + "'");