Class DLTrashServiceUtil
Object
com.liferay.document.library.kernel.service.DLTrashServiceUtil
Provides the remote service utility for DLTrash. This utility wraps
com.liferay.portlet.documentlibrary.service.impl.DLTrashServiceImpl and is an
access point for service operations in application layer code running on a
remote server. Methods of this service are expected to have security checks
based on the propagated JAAS credentials because this service can be
accessed remotely.- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the OSGi service identifier.static DLTrashServicestatic FileEntrymoveFileEntryFromTrash(long fileEntryId, long newFolderId, ServiceContext serviceContext) Moves the file entry from a trashed folder to the new folder.static FileEntrymoveFileEntryToTrash(long fileEntryId) Moves the file entry with the primary key to the trash portlet.static FileShortcutmoveFileShortcutFromTrash(long fileShortcutId, long newFolderId, ServiceContext serviceContext) Moves the file shortcut from a trashed folder to the new folder.static FileShortcutmoveFileShortcutToTrash(long fileShortcutId) Moves the file shortcut with the primary key to the trash portlet.static FoldermoveFolderFromTrash(long folderId, long parentFolderId, ServiceContext serviceContext) Moves the folder with the primary key from the trash portlet to the new parent folder with the primary key.static FoldermoveFolderToTrash(long folderId) Moves the folder with the primary key to the trash portlet.static voidrestoreFileEntryFromTrash(long fileEntryId) Restores the file entry with the primary key from the trash portlet.static voidrestoreFileShortcutFromTrash(long fileShortcutId) Restores the file shortcut with the primary key from the trash portlet.static voidrestoreFolderFromTrash(long folderId) Restores the folder with the primary key from the trash portlet.static voidsetService(DLTrashService service)
-
Constructor Details
-
DLTrashServiceUtil
public DLTrashServiceUtil()
-
-
Method Details
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Returns:
- the OSGi service identifier
-
moveFileEntryFromTrash
public static FileEntry moveFileEntryFromTrash(long fileEntryId, long newFolderId, ServiceContext serviceContext) throws PortalException Moves the file entry from a trashed folder to the new folder.- Parameters:
fileEntryId- the primary key of the file entrynewFolderId- the primary key of the new folderserviceContext- the service context to be applied- Returns:
- the file entry
- Throws:
PortalException
-
moveFileEntryToTrash
Moves the file entry with the primary key to the trash portlet.- Parameters:
fileEntryId- the primary key of the file entry- Returns:
- the file entry
- Throws:
PortalException
-
moveFileShortcutFromTrash
public static FileShortcut moveFileShortcutFromTrash(long fileShortcutId, long newFolderId, ServiceContext serviceContext) throws PortalException Moves the file shortcut from a trashed folder to the new folder.- Parameters:
fileShortcutId- the primary key of the file shortcutnewFolderId- the primary key of the new folderserviceContext- the service context to be applied- Returns:
- the file shortcut
- Throws:
PortalException
-
moveFileShortcutToTrash
Moves the file shortcut with the primary key to the trash portlet.- Parameters:
fileShortcutId- the primary key of the file shortcut- Returns:
- the file shortcut
- Throws:
PortalException
-
moveFolderFromTrash
public static Folder moveFolderFromTrash(long folderId, long parentFolderId, ServiceContext serviceContext) throws PortalException Moves the folder with the primary key from the trash portlet to the new parent folder with the primary key.- Parameters:
folderId- the primary key of the folderparentFolderId- the primary key of the new parent folderserviceContext- the service context to be applied- Returns:
- the file entry
- Throws:
PortalException
-
moveFolderToTrash
Moves the folder with the primary key to the trash portlet.- Parameters:
folderId- the primary key of the folder- Returns:
- the file entry
- Throws:
PortalException
-
restoreFileEntryFromTrash
Restores the file entry with the primary key from the trash portlet.- Parameters:
fileEntryId- the primary key of the file entry- Throws:
PortalException
-
restoreFileShortcutFromTrash
Restores the file shortcut with the primary key from the trash portlet.- Parameters:
fileShortcutId- the primary key of the file shortcut- Throws:
PortalException
-
restoreFolderFromTrash
Restores the folder with the primary key from the trash portlet.- Parameters:
folderId- the primary key of the folder- Throws:
PortalException
-
getService
-
setService
-