Tribune

Home » Liferay Portal » English » 2. Using Liferay » General

Vista Combinata Vista Piatta Vista ad Albero
Discussioni [ Precedente | Successivo ]
toggle
Arthur Grohe
Document Library API recommended usage ?
9 novembre 2012 6.44
Risposta

Arthur Grohe

Punteggio: Junior Member

Messaggi: 49

Data di Iscrizione: 5 novembre 2012

Messaggi recenti

Hi guys,

I have some questions about the DL Api:

What is the best practice to...
+ Add/Delete Folders
+ Add/Delete FileEntries
+ Set Permissions to FileEntries


What I found is this:
1DLFolderLocalServiceUtil.addFolder(
2long userId, long groupId, long repositoryId, boolean mountPoint, long parentFolderId,
3String name, String description, ServiceContext serviceContext)


+ How do I get the repositoryId and what is a repository in liferay?
+ What does mountPoint do?

..and that:
1DLFileEntryLocalServiceUtil.addFileEntry(
2long userId, long groupId, long repositoryId, long folderId, String sourceFileName,
3String mimeType, String title, String description, String changeLog, long fileEntryTypeId,
4Map<String,Fields> fieldsMap, File file, InputStream is, long size, ServiceContext serviceContext)


+ What should I put in "changeLog"?
+ What is a FileEntryTypeId?
+ What are the fieldsMap?

further question:
+ What parameters are optional / can be set to null?
Mika Koivisto
RE: Document Library API recommended usage ?
3 dicembre 2012 17.53
Risposta

Mika Koivisto

LIFERAY STAFF

Punteggio: Liferay Legend

Messaggi: 1498

Data di Iscrizione: 7 agosto 2006

Messaggi recenti

First of all starting from Liferay 6.1 use DLAppServiceUtil or DLAppLocalServiceUtil instead of DLFileEntry or DLFolder services as those are internal implementation for LiferayRepository. The repositoryId is the scopeGroupId for LiferayRepository and some other value for a mounted repository.
Chandra Bhanu Rastogi
RE: Document Library API recommended usage ?
31 gennaio 2013 0.55
Risposta

Chandra Bhanu Rastogi

Punteggio: New Member

Messaggi: 7

Data di Iscrizione: 26 dicembre 2012

Messaggi recenti

Hello Mika..
How will i get "changeLog",and "bytes" to use this method.
DLAppLocalServiceUtil.addFileEntry(userId, repositoryId, folderId, sourceFileName, mimeType, title, description, changeLog, bytes, serviceContext)

I am trying to upload file from browser to liferay server in dl. i created one folder in dl and get repositoryId and folderId. if there is any another method to upload file, please tell me or resolve my problem regarding this method's parameters.

Thanks
Chandra bhanu