what the content of the parameter “obc” for /dlfolder/get-folders restful api in liferay?

≡放荡痞女 提交于 2020-01-06 16:21:56

问题


The parameter obc for restful api /dlfolder/get-folders in liferay requires the type com.liferay.portal.kernel.util.OrderByComparator.

I tried many possible values but always got the error message

Unable to cast value to type: com.liferay.portal.kernel.util.OrderByComparator

Now I got stuck in this problem. Is anyone who know what the value should be put in this parameter, please teach me, thx.


回答1:


When there are object as parameters have to put + before the parameter and : as saparator of full name class like this

http://localhost:8080/api/jsonws/dlfolder/get-folders/group-id/0/parent-folder-id/0/start/0/end/10/+obc:com.liferay.portlet.documentlibrary.util.comparator.FolderNameComparator

or javascript

Liferay.Service(
  '/dlfolder/get-folders',
  {
    groupId: 0,
    parentFolderId: 0,
    start: 0,
    end: 10,
    "+obc":"com.liferay.portlet.documentlibrary.util.comparator.FolderNameComparator"
  },
  function(obj) {
    console.log(obj);
  }
);

link to documentation for more info https://dev.liferay.com/develop/tutorials/-/knowledge_base/6-2/invoking-json-web-services#object-parameters



来源:https://stackoverflow.com/questions/40907097/what-the-content-of-the-parameter-obc-for-dlfolder-get-folders-restful-api-in

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!