Creating Files, Folders, and Shortcuts

The primary use case for the API is to create files, folders, and file shortcuts in the Documents and Media library.

If you’ve used other Liferay APIs, the Docs & Media API follows the same conventions. In general, methods that do similar things tend to have similar names. When you must create an entity (whatever it is), look for methods that follow the pattern add[ModelName], where [ModelName] is the name of the entity’s data model object. As the getting started tutorial explains, you’ll use DLAppService to access the API. This service object contains the following methods for adding entities:

  • addFileEntry: Adds a file.
  • addFolder: Adds a folder.
  • addFileShortcut: Adds a shortcut to a file.

The tutorials that follow show you how to use these methods.

« Getting Started with the Documents and Media APICreating Files »
この記事は役に立ちましたか?
0人中0人がこの記事が役に立ったと言っています