Liferay 6.2-ce-ga5

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:
IdentifiableBean, 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
counterLocalService, groupFinder, groupLocalService, groupPersistence, groupService, persistedModelLocalServiceRegistry, resourceLocalService, systemEventLocalService, systemEventPersistence, trashEntryLocalService, trashEntryPersistence, trashEntryService, trashVersionLocalService, trashVersionPersistence, userFinder, userLocalService, userPersistence, userService
 
Fields inherited from class com.liferay.portal.service.BaseLocalServiceImpl
layoutPersistence
 
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.
 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 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)
           
 
Methods inherited from class com.liferay.portlet.trash.service.base.TrashEntryLocalServiceBaseImpl
addTrashEntry, afterPropertiesSet, createTrashEntry, deleteTrashEntry, deleteTrashEntry, destroy, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, dynamicQueryCount, fetchTrashEntry, getBeanIdentifier, getCounterLocalService, getGroupFinder, getGroupLocalService, getGroupPersistence, getGroupService, getModelClass, getModelClassName, getPersistedModel, getResourceLocalService, getSystemEventLocalService, getSystemEventPersistence, getTrashEntries, getTrashEntriesCount, getTrashEntry, getTrashEntryLocalService, getTrashEntryPersistence, getTrashEntryService, getTrashVersionLocalService, getTrashVersionPersistence, getUserFinder, getUserLocalService, getUserPersistence, getUserService, runSQL, setBeanIdentifier, setCounterLocalService, setGroupFinder, setGroupLocalService, setGroupPersistence, setGroupService, setResourceLocalService, setSystemEventLocalService, setSystemEventPersistence, setTrashEntryLocalService, setTrashEntryPersistence, setTrashEntryService, setTrashVersionLocalService, setTrashVersionPersistence, setUserFinder, setUserLocalService, setUserPersistence, setUserService, updateTrashEntry
 
Methods inherited from class com.liferay.portal.service.BaseLocalServiceImpl
getClassLoader, getLayoutURL, getLayoutURL
 
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,
                                SystemException
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
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 - if a user with the primary key could not be found
SystemException - if a system exception occurred

checkEntries

public void checkEntries()
                  throws PortalException,
                         SystemException
Throws:
PortalException
SystemException

deleteEntries

public void deleteEntries(long groupId)
                   throws SystemException
Throws:
SystemException

deleteEntry

public TrashEntry deleteEntry(long entryId)
                       throws PortalException,
                              SystemException
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
Throws:
PortalException - if a trash entry with the primary key could not be found
SystemException - if a system exception occurred

deleteEntry

public TrashEntry deleteEntry(String className,
                              long classPK)
                       throws PortalException,
                              SystemException
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
Throws:
PortalException - if a trash entry with the primary key could not be found
SystemException - if a system exception occurred

deleteEntry

@Indexable(type=DELETE)
public TrashEntry deleteEntry(TrashEntry trashEntry)
                       throws SystemException
Throws:
SystemException

fetchEntry

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

Parameters:
entryId - the primary key of the entry
Returns:
the trash entry with the primary key
Throws:
SystemException - if a system exception occurred

fetchEntry

public TrashEntry fetchEntry(String className,
                             long classPK)
                      throws SystemException
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
Throws:
SystemException - if a system exception occurred

getEntries

public List<TrashEntry> getEntries(long groupId)
                            throws SystemException
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
Throws:
SystemException - if a system exception occurred

getEntries

public List<TrashEntry> getEntries(long groupId,
                                   int start,
                                   int end)
                            throws SystemException
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
Throws:
SystemException - if a system exception occurred

getEntries

public List<TrashEntry> getEntries(long groupId,
                                   int start,
                                   int end,
                                   OrderByComparator obc)
                            throws SystemException
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
Throws:
SystemException - if a system exception occurred

getEntries

public List<TrashEntry> getEntries(long groupId,
                                   String className)
                            throws SystemException
Throws:
SystemException

getEntriesCount

public int getEntriesCount(long groupId)
                    throws SystemException
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
Throws:
SystemException - if a system exception occurred

getEntry

public TrashEntry getEntry(long entryId)
                    throws PortalException,
                           SystemException
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 - if a trash entry with the primary key could not be found
SystemException - if a system exception occurred

getEntry

public TrashEntry getEntry(String className,
                           long classPK)
                    throws PortalException,
                           SystemException
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 - if a trash entry with the primary key could not be found
SystemException - if a system exception occurred

search

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

getMaxAge

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

Liferay 6.2-ce-ga5