public final class DocumentUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static com.liferay.portal.kernel.repository.model.FileEntry |
createDocument(long companyId,
long groupId,
long folderId,
String fileName,
String title,
long userId,
long repoId,
byte[] content)
Creates a document that will be located at a particular folder.
|
static com.liferay.portal.kernel.repository.model.FileEntry |
findDocument(String documentName,
long groupId,
long company,
long repoId,
long userId)
Finds a document by looking it up with a given document name (title) for a
given group of a given company.
|
static com.liferay.portal.kernel.repository.model.FileEntry |
findDocument(String documentName,
String folderPath,
long groupId,
long company,
long repoId,
long userId)
Tries to retrieve the file entry of a document.
|
static void |
moveFile(com.liferay.portal.kernel.repository.model.FileEntry fe,
long folderId,
long userId)
Moves the given file entry to a folder with a given id.
|
static void |
updateFile(com.liferay.portal.kernel.repository.model.FileEntry fe,
byte[] content,
long userId,
String sourceFileName)
Updates a given file entry with a given content.
|
public static com.liferay.portal.kernel.repository.model.FileEntry findDocument(String documentName, String folderPath, long groupId, long company, long repoId, long userId)
documentName - The name of the document (i.e., title).folderPath - the folder path to look for (where the document is stored).groupId - the id of the group to which this document belongs to.company - the company name.repoId - the id of the repository where the file is stored.userId - the user is of the importing user (not used in this case, as no
folder is automatically created with this operation).public static com.liferay.portal.kernel.repository.model.FileEntry findDocument(String documentName, long groupId, long company, long repoId, long userId)
documentName - The name of the document (title)groupId - the group id.company - the id of the company.repoId - the repository id.userId - the id of the user executing this operation.public static void updateFile(com.liferay.portal.kernel.repository.model.FileEntry fe,
byte[] content,
long userId,
String sourceFileName)
fe - The file entry to be updated with a given content.content - The content to be updated.userId - The user id of the updating user.sourceFileName - The filename of the file.public static void moveFile(com.liferay.portal.kernel.repository.model.FileEntry fe,
long folderId,
long userId)
fe - the file entry.folderId - the id of the folder where the file will be moved to.userId - the user id of the user who executes the moving of the file.public static com.liferay.portal.kernel.repository.model.FileEntry createDocument(long companyId,
long groupId,
long folderId,
String fileName,
String title,
long userId,
long repoId,
byte[] content)
companyId - the company id to which the file will be associated.groupId - the group id to which the file will be associated.folderId - the folder id where the file will be located in documents and
mediafileName - the name of the file.title - the title of the file (will be used to access the file).userId - the id of the user who is importing the content.repoId - the id of the repository.content - the content of the file file to be stored.Copyright © 2016–2022 Lundegaard a.s.. All rights reserved.