"Importing resources from " + servletContextName +
" to group " + importer.getGroupId() + " takes " +
endTime + " ms");
}
Message newMessage = new Message();
newMessage.put("companyId", company.getCompanyId());
newMessage.put("servletContextName", servletContextName);
newMessage.put("targetClassName", targetClassName);
newMessage.put("targetClassPK", importer.getTargetClassPK());
if (message.getResponseId() != null) {
Map<String, Object> responseMap =
new HashMap<String, Object>();
responseMap.put("groupId", importer.getTargetClassPK());
newMessage.setPayload(responseMap);
newMessage.setResponseId(message.getResponseId());
}
MessageBusUtil.sendMessage(
"liferay/resources_importer", newMessage);
}
catch (ImporterException ie) {
Message newMessage = new Message();
newMessage.put("companyId", company.getCompanyId());
newMessage.put("error", ie.getMessage());
newMessage.put("servletContextName", servletContextName);
newMessage.put("targetClassName", targetClassName);
newMessage.put("targetClassPK", 0);
MessageBusUtil.sendMessage(
"liferay/resources_importer", newMessage);
}
finally {