validate(name, email, message);
long entryId = counterLocalService.increment();
Entry entry = entryPersistence.create(entryId);
entry.setUuid(serviceContext.getUuid());
entry.setUserId(userId);
entry.setGroupId(groupId);
entry.setCompanyId(user.getCompanyId());
entry.setUserName(user.getFullName());
entry.setCreateDate(serviceContext.getCreateDate(now));
entry.setModifiedDate(serviceContext.getModifiedDate(now));
entry.setExpandoBridgeAttributes(serviceContext);
entry.setGuestbookId(guestbookId);
entry.setName(name);
entry.setEmail(email);
entry.setMessage(message);
entryPersistence.update(entry);
resourceLocalService.addResources(user.getCompanyId(), groupId, userId,
Entry.class.getName(), entryId, false, true, true);
AssetEntry assetEntry = assetEntryLocalService.updateEntry(userId,
groupId, entry.getCreateDate(), entry.getModifiedDate(),
Entry.class.getName(), entryId, entry.getUuid(), 0,
serviceContext.getAssetCategoryIds(),
serviceContext.getAssetTagNames(), true, null, null, null,
ContentTypes.TEXT_HTML, entry.getMessage(), null, null, null,
null, 0, 0, null, false);
assetLinkLocalService.updateLinks(userId, assetEntry.getEntryId(),
serviceContext.getAssetLinkEntryIds(),
AssetLinkConstants.TYPE_RELATED);