public void preparePublisher(Publisher publisher,
boolean ensureDefaultFolder)
throws IdentityException, SQLException {
// ensure the the publisher is referenced within the local user table
LocalDao localDao = new LocalDao(getRequestContext());
if (publisher.getIsRemote()) {
localDao.ensureReferenceToRemoteUser(publisher);
}
// ensure that the publisher has a folder
if (ensureDefaultFolder) {
publisher.setFolderUuid(UuidUtil.makeUuid(true));