List of usage examples for com.liferay.portal.kernel.model SystemEventConstants TYPE_DELETE
int TYPE_DELETE
To view the source code for com.liferay.portal.kernel.model SystemEventConstants TYPE_DELETE.
Click Source Link
From source file:ca.efendi.datafeeds.service.CJProductLocalService.java
License:Open Source License
@Indexable(type = IndexableType.DELETE) @SystemEvent(type = SystemEventConstants.TYPE_DELETE) public CJProduct deleteEntry(CJProduct entry) throws PortalException;
From source file:ca.efendi.datafeeds.service.impl.CJProductLocalServiceImpl.java
License:Open Source License
@Indexable(type = IndexableType.DELETE) @Override/*from w w w . j a v a 2 s . c om*/ @SystemEvent(type = SystemEventConstants.TYPE_DELETE) public CJProduct deleteEntry(CJProduct entry) throws PortalException { // Entry cjProductPersistence.remove(entry); // Resources resourceLocalService.deleteResource(entry.getCompanyId(), CJProduct.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, entry.getProductId()); // imageLocalService.deleteImage(entry.getSmallImageId()); subscriptionLocalService.deleteSubscriptions(entry.getCompanyId(), CJProduct.class.getName(), entry.getProductId()); //blogsStatsUserLocalService.updateStatsUser( // entry.getGroupId(), entry.getUserId(), entry.getDisplayDate()); assetEntryLocalService.deleteEntry(CJProduct.class.getName(), entry.getProductId()); // long coverImageFileEntryId = entry.getCoverImageFileEntryId(); // // if (coverImageFileEntryId != 0) { // PortletFileRepositoryUtil.deletePortletFileEntry( // coverImageFileEntryId); // } // long smallImageFileEntryId = entry.getSmallImageFileEntryId(); // // if (smallImageFileEntryId != 0) { // PortletFileRepositoryUtil.deletePortletFileEntry( // smallImageFileEntryId); // } //deleteDiscussion(entry); //expandoRowLocalService.deleteRows(entry.getEntryId()); // Ratings ratingsStatsLocalService.deleteStats(CJProduct.class.getName(), entry.getProductId()); trashEntryLocalService.deleteEntry(CJProduct.class.getName(), entry.getProductId()); // Workflow workflowInstanceLinkLocalService.deleteWorkflowInstanceLinks(entry.getCompanyId(), entry.getGroupId(), CJProduct.class.getName(), entry.getProductId()); return entry; }
From source file:ch.inofix.contact.service.impl.ContactLocalServiceImpl.java
License:Open Source License
@Indexable(type = IndexableType.DELETE) @Override/*from w w w .j av a2 s.com*/ @SystemEvent(type = SystemEventConstants.TYPE_DELETE) public Contact deleteContact(long contactId) throws PortalException { Contact contact = contactPersistence.findByPrimaryKey(contactId); return deleteContact(contact); }
From source file:ch.inofix.contact.service.impl.ContactLocalServiceImpl.java
License:Open Source License
@Indexable(type = IndexableType.DELETE) @Override/*from ww w . j a v a 2 s. co m*/ @SystemEvent(type = SystemEventConstants.TYPE_DELETE) public Contact deleteContact(Contact contact) throws PortalException { // Contact contactPersistence.remove(contact); // Resource resourceLocalService.deleteResource(contact.getCompanyId(), Contact.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, contact.getContactId()); // Asset assetEntryLocalService.deleteEntry(Contact.class.getName(), contact.getContactId()); return contact; }
From source file:ch.inofix.referencemanager.service.impl.BibliographyLocalServiceImpl.java
License:Open Source License
@Indexable(type = IndexableType.DELETE) @Override/* w w w.j a v a 2s.c o m*/ @SystemEvent(type = SystemEventConstants.TYPE_DELETE) public Bibliography deleteBibliography(Bibliography bibliography) throws PortalException { // Bibliography bibliographyPersistence.remove(bibliography); // Resources resourceLocalService.deleteResource(bibliography.getCompanyId(), Bibliography.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, bibliography.getBibliographyId()); // Subscriptions subscriptionLocalService.deleteSubscriptions(bibliography.getCompanyId(), Bibliography.class.getName(), bibliography.getBibliographyId()); // Asset assetEntryLocalService.deleteEntry(Bibliography.class.getName(), bibliography.getBibliographyId()); // BibRefRelation bibRefRelationLocalService.deleteByBibliographyId(bibliography.getBibliographyId()); // Comment // TODO // deleteDiscussion(bibliography); // Expando expandoRowLocalService.deleteRows(bibliography.getBibliographyId()); // Ratings ratingsStatsLocalService.deleteStats(Bibliography.class.getName(), bibliography.getBibliographyId()); // Trash trashEntryLocalService.deleteEntry(Bibliography.class.getName(), bibliography.getBibliographyId()); // Workflow // TODO: do we need workflow support? // workflowInstanceLinkLocalService.deleteWorkflowInstanceLinks( // bibliography.getCompanyId(), bibliography.getGroupId(), // Bibliography.class.getName(), bibliography.getBibliographyId()); return bibliography; }
From source file:ch.inofix.referencemanager.service.impl.ReferenceLocalServiceImpl.java
License:Open Source License
@Indexable(type = IndexableType.DELETE) @Override//from www . j a v a 2 s . co m @SystemEvent(type = SystemEventConstants.TYPE_DELETE) public Reference deleteReference(Reference reference) throws PortalException { // Reference referencePersistence.remove(reference); // Resources resourceLocalService.deleteResource(reference.getCompanyId(), Reference.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, reference.getReferenceId()); // Subscriptions subscriptionLocalService.deleteSubscriptions(reference.getCompanyId(), Reference.class.getName(), reference.getReferenceId()); // Asset assetEntryLocalService.deleteEntry(Reference.class.getName(), reference.getReferenceId()); // Comment // TODO // deleteDiscussion(reference); // Expando expandoRowLocalService.deleteRows(reference.getReferenceId()); // Ratings ratingsStatsLocalService.deleteStats(Reference.class.getName(), reference.getReferenceId()); // Trash trashEntryLocalService.deleteEntry(Reference.class.getName(), reference.getReferenceId()); // Workflow // TODO: do we need workflow support? // workflowInstanceLinkLocalService.deleteWorkflowInstanceLinks( // reference.getCompanyId(), reference.getGroupId(), // Reference.class.getName(), reference.getReferenceId()); return reference; }
From source file:ch.inofix.timetracker.service.impl.TaskRecordLocalServiceImpl.java
License:Open Source License
@Indexable(type = IndexableType.DELETE) @Override/*from w ww .j a v a2s . com*/ @SystemEvent(type = SystemEventConstants.TYPE_DELETE) public TaskRecord deleteTaskRecord(TaskRecord taskRecord) throws PortalException { // TaskRecord taskRecordPersistence.remove(taskRecord); // Resources resourceLocalService.deleteResource(taskRecord.getCompanyId(), TaskRecord.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, taskRecord.getTaskRecordId()); // Asset assetEntryLocalService.deleteEntry(TaskRecord.class.getName(), taskRecord.getTaskRecordId()); // Workflow // TODO: add workflow support // workflowInstanceLinkLocalService.deleteWorkflowInstanceLinks( // taskRecord.getCompanyId(), taskRecord.getGroupId(), // TaskRecord.class.getName(), taskRecord.getTaskRecordId()); return taskRecord; }
From source file:com.liferay.blogs.service.BlogsEntryLocalService.java
License:Open Source License
@Indexable(type = IndexableType.DELETE) @SystemEvent(type = SystemEventConstants.TYPE_DELETE) public BlogsEntry deleteEntry(BlogsEntry entry) throws PortalException;
From source file:com.liferay.blogs.service.impl.BlogsEntryLocalServiceImpl.java
License:Open Source License
@Indexable(type = IndexableType.DELETE) @Override/*from w w w.j a va2 s . c o m*/ @SystemEvent(type = SystemEventConstants.TYPE_DELETE) public BlogsEntry deleteEntry(BlogsEntry entry) throws PortalException { // Entry blogsEntryPersistence.remove(entry); // Resources resourceLocalService.deleteResource(entry.getCompanyId(), BlogsEntry.class.getName(), ResourceConstants.SCOPE_INDIVIDUAL, entry.getEntryId()); // Image imageLocalService.deleteImage(entry.getSmallImageId()); // Subscriptions subscriptionLocalService.deleteSubscriptions(entry.getCompanyId(), BlogsEntry.class.getName(), entry.getEntryId()); // Statistics blogsStatsUserLocalService.updateStatsUser(entry.getGroupId(), entry.getUserId(), entry.getDisplayDate()); // Asset assetEntryLocalService.deleteEntry(BlogsEntry.class.getName(), entry.getEntryId()); // Attachments long coverImageFileEntryId = entry.getCoverImageFileEntryId(); if (coverImageFileEntryId != 0) { PortletFileRepositoryUtil.deletePortletFileEntry(coverImageFileEntryId); } long smallImageFileEntryId = entry.getSmallImageFileEntryId(); if (smallImageFileEntryId != 0) { PortletFileRepositoryUtil.deletePortletFileEntry(smallImageFileEntryId); } // Comment deleteDiscussion(entry); // Expando expandoRowLocalService.deleteRows(entry.getEntryId()); // Ratings ratingsStatsLocalService.deleteStats(BlogsEntry.class.getName(), entry.getEntryId()); // Trash trashEntryLocalService.deleteEntry(BlogsEntry.class.getName(), entry.getEntryId()); // Workflow workflowInstanceLinkLocalService.deleteWorkflowInstanceLinks(entry.getCompanyId(), entry.getGroupId(), BlogsEntry.class.getName(), entry.getEntryId()); return entry; }
From source file:com.liferay.bookmarks.service.BookmarksEntryLocalService.java
License:Open Source License
@Indexable(type = IndexableType.DELETE) @SystemEvent(type = SystemEventConstants.TYPE_DELETE) public BookmarksEntry deleteEntry(BookmarksEntry entry) throws PortalException;