wherePhrase.append(" AND ").append(tableAlias).append("DOCUUID <> ").append(tableAlias).append("SITEUUID ");
args.put("sSiteUuid", sSiteUuid);
}
// document owner
Publisher owner = null;
if (getOwner().length()>0) {
RequestContext context2 = null;
try {
if (context != null) {
owner = new Publisher(context, getOwner());
} else {
context2 = RequestContext.extract(null);
owner = new Publisher(context2, getOwner());
}
} catch (Exception ex) {
LOGGER.log(Level.FINER, "Error creating publisher", ex);
} finally {
if (context2 != null) context2.onExecutionPhaseCompleted();
}
} else {
if (publisher!=null && !publisher.getIsAdministrator()) {
owner = publisher;
}
}
if (owner!=null) {
appendExpression(wherePhrase, "" +tableAlias+ "OWNER = ?");
args.put("nUserId", new Integer(owner.getLocalID()));
}
// approval status
String sStatus = getApprovalStatus();
if ((sStatus.length() > 0) && !sStatus.equals(MmdEnums.ApprovalStatus.any.toString())) {