Liferay 7.0-ce-b4

com.liferay.portlet.trash.service.impl
Class TrashEntryLocalServiceImpl

java.lang.Object
  extended by com.liferay.portal.service.BaseLocalServiceImpl
      extended by com.liferay.portlet.trash.service.base.TrashEntryLocalServiceBaseImpl
          extended by com.liferay.portlet.trash.service.impl.TrashEntryLocalServiceImpl
All Implemented Interfaces:
IdentifiableOSGiService, BaseLocalService, PersistedModelLocalService, TrashEntryLocalService

public class TrashEntryLocalServiceImpl
extends TrashEntryLocalServiceBaseImpl

Provides the local service for accessing, adding, checking, and deleting trash entries in the Recycle Bin.


Field Summary
 
Fields inherited from class com.liferay.portlet.trash.service.base.TrashEntryLocalServiceBaseImpl
classNameLocalService, classNamePersistence, counterLocalService, groupFinder, groupLocalService, groupPersistence, persistedModelLocalServiceRegistry, resourceLocalService, systemEventLocalService, systemEventPersistence, trashEntryLocalService, trashEntryPersistence, trashVersionLocalService, trashVersionPersistence, userFinder, userLocalService, userPersistence
 
Constructor Summary
TrashEntryLocalServiceImpl()
           
 
Method Summary
 TrashEntry addTrashEntry(long userId, long groupId, String className, long classPK, String classUuid, String referrerClassName, int status, List<ObjectValuePair<Long,Integer>> statusOVPs, UnicodeProperties typeSettingsProperties)
          Moves an entry to trash.
protected  SearchContext buildSearchContext(long companyId, long groupId, long userId, String keywords, int start, int end, Sort sort)
           
 void checkEntries()
           
 void deleteEntries(long groupId)
           
 TrashEntry deleteEntry(long entryId)
          Deletes the trash entry with the primary key.
 TrashEntry deleteEntry(String className, long classPK)
          Deletes the trash entry with the entity class name and primary key.
 TrashEntry deleteEntry(TrashEntry trashEntry)
           
 TrashEntry fetchEntry(long entryId)
          Returns the trash entry with the primary key.
 TrashEntry fetchEntry(String className, long classPK)
          Returns the trash entry with the entity class name and primary key.
 List<TrashEntry> getEntries(long groupId)
          Returns the trash entries with the matching group ID.
 List<TrashEntry> getEntries(long groupId, int start, int end)
          Returns a range of all the trash entries matching the group ID.
 List<TrashEntry> getEntries(long groupId, int start, int end, OrderByComparator<TrashEntry> obc)
          Returns a range of all the trash entries matching the group ID.
 List<TrashEntry> getEntries(long groupId, String className)
           
 int getEntriesCount(long groupId)
          Returns the number of trash entries with the group ID.
 TrashEntry getEntry(long entryId)
          Returns the trash entry with the primary key.
 TrashEntry getEntry(String className, long classPK)
          Returns the entry with the entity class name and primary key.
protected  Date getMaxAge(Group group)
           
 Hits search(long companyId, long groupId, long userId, String keywords, int start, int end, Sort sort)
           
 BaseModelSearchResult<TrashEntry> searchTrashEntries(long companyId, long groupId, long userId, String keywords, int start, int end, Sort sort)
           
 
Methods inherited from class com.liferay.portlet.trash.service.base.TrashEntryLocalServiceBaseImpl
addTrashEntry, afterPropertiesSet, createTrashEntry, deletePersistedModel, deleteTrashEntry, deleteTrashEntry, destroy, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, dynamicQueryCount, fetchTrashEntry, getActionableDynamicQuery, getClassNameLocalService, getClassNamePersistence, getCounterLocalService, getGroupFinder, getGroupLocalService, getGroupPersistence, getIndexableActionableDynamicQuery, getModelClass, getModelClassName, getOSGiServiceIdentifier, getPersistedModel, getResourceLocalService, getSystemEventLocalService, getSystemEventPersistence, getTrashEntries, getTrashEntriesCount, getTrashEntry, getTrashEntryLocalService, getTrashEntryPersistence, getTrashVersionLocalService, getTrashVersionPersistence, getUserFinder, getUserLocalService, getUserPersistence, initActionableDynamicQuery, runSQL, setClassNameLocalService, setClassNamePersistence, setCounterLocalService, setGroupFinder, setGroupLocalService, setGroupPersistence, setResourceLocalService, setSystemEventLocalService, setSystemEventPersistence, setTrashEntryLocalService, setTrashEntryPersistence, setTrashVersionLocalService, setTrashVersionPersistence, setUserFinder, setUserLocalService, setUserPersistence, updateTrashEntry
 
Methods inherited from class com.liferay.portal.service.BaseLocalServiceImpl
getClassLoader, getLocalizationMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TrashEntryLocalServiceImpl

public TrashEntryLocalServiceImpl()
Method Detail

addTrashEntry

public TrashEntry addTrashEntry(long userId,
                                long groupId,
                                String className,
                                long classPK,
                                String classUuid,
                                String referrerClassName,
                                int status,
                                List<ObjectValuePair<Long,Integer>> statusOVPs,
                                UnicodeProperties typeSettingsProperties)
                         throws PortalException
Moves an entry to trash.

Parameters:
userId - the primary key of the user removing the entity
groupId - the primary key of the entry's group
className - the class name of the entity
classPK - the primary key of the entity
classUuid - the UUID of the entity's class
referrerClassName - the referrer class name used to add a deletion SystemEvent
status - the status of the entity prior to being moved to trash
statusOVPs - the primary keys and statuses of any of the entry's versions (e.g., DLFileVersion)
typeSettingsProperties - the type settings properties
Returns:
the trashEntry
Throws:
PortalException

checkEntries

public void checkEntries()
                  throws PortalException
Throws:
PortalException

deleteEntries

public void deleteEntries(long groupId)

deleteEntry

public TrashEntry deleteEntry(long entryId)
Deletes the trash entry with the primary key.

Parameters:
entryId - the primary key of the trash entry
Returns:
the trash entry with the primary key

deleteEntry

public TrashEntry deleteEntry(String className,
                              long classPK)
Deletes the trash entry with the entity class name and primary key.

Parameters:
className - the class name of entity
classPK - the primary key of the entry
Returns:
the trash entry with the entity class name and primary key

deleteEntry

@Indexable(type=DELETE)
public TrashEntry deleteEntry(TrashEntry trashEntry)

fetchEntry

public TrashEntry fetchEntry(long entryId)
Returns the trash entry with the primary key.

Parameters:
entryId - the primary key of the entry
Returns:
the trash entry with the primary key

fetchEntry

public TrashEntry fetchEntry(String className,
                             long classPK)
Returns the trash entry with the entity class name and primary key.

Parameters:
className - the class name of the entity
classPK - the primary key of the entity
Returns:
the trash entry with the entity class name and primary key

getEntries

public List<TrashEntry> getEntries(long groupId)
Returns the trash entries with the matching group ID.

Parameters:
groupId - the primary key of the group
Returns:
the trash entries with the group ID

getEntries

public List<TrashEntry> getEntries(long groupId,
                                   int start,
                                   int end)
Returns a range of all the trash entries matching the group ID.

Parameters:
groupId - the primary key of the group
start - the lower bound of the range of trash entries to return
end - the upper bound of the range of trash entries to return (not inclusive)
Returns:
the range of matching trash entries

getEntries

public List<TrashEntry> getEntries(long groupId,
                                   int start,
                                   int end,
                                   OrderByComparator<TrashEntry> obc)
Returns a range of all the trash entries matching the group ID.

Parameters:
groupId - the primary key of the group
start - the lower bound of the range of trash entries to return
end - the upper bound of the range of trash entries to return (not inclusive)
obc - the comparator to order the trash entries (optionally null)
Returns:
the range of matching trash entries ordered by comparator obc

getEntries

public List<TrashEntry> getEntries(long groupId,
                                   String className)

getEntriesCount

public int getEntriesCount(long groupId)
Returns the number of trash entries with the group ID.

Parameters:
groupId - the primary key of the group
Returns:
the number of matching trash entries

getEntry

public TrashEntry getEntry(long entryId)
                    throws PortalException
Returns the trash entry with the primary key.

Parameters:
entryId - the primary key of the trash entry
Returns:
the trash entry with the primary key
Throws:
PortalException

getEntry

public TrashEntry getEntry(String className,
                           long classPK)
                    throws PortalException
Returns the entry with the entity class name and primary key.

Parameters:
className - the class name of the entity
classPK - the primary key of the entity
Returns:
the trash entry with the entity class name and primary key
Throws:
PortalException

search

public Hits search(long companyId,
                   long groupId,
                   long userId,
                   String keywords,
                   int start,
                   int end,
                   Sort sort)

searchTrashEntries

public BaseModelSearchResult<TrashEntry> searchTrashEntries(long companyId,
                                                            long groupId,
                                                            long userId,
                                                            String keywords,
                                                            int start,
                                                            int end,
                                                            Sort sort)

buildSearchContext

protected SearchContext buildSearchContext(long companyId,
                                           long groupId,
                                           long userId,
                                           String keywords,
                                           int start,
                                           int end,
                                           Sort sort)

getMaxAge

protected Date getMaxAge(Group group)
                  throws PortalException
Throws:
PortalException

Liferay 7.0-ce-b4