Sunday, August 19, 2012

API để lưu tài liệu vào Favorites

Sau khi được các chuyên gia Alfresco giải đáp thắc mắc.

Giải pháp về chức năng này được đc đưa ra như sau:



The favorites is used to mark a document as a favorite. In the UI it shows as a filled in star and then shows up when you filter on favorites.


To mark a document as a favorite, you POST to: 
http://localhost:8080/alfresco/s/api/people/{user id}/preferences

The following JSON:
{"org":{"alfresco":{"share":{"documents":{"favourites":"{node ref of the favorite document"}}}}}

Where "node ref of the favorite document" looks like: 
workspace://SpacesStore/1a0b110f-1e09-4ca2-b367-fe25e4964a4e

Jeff

2 comments:

  1. Cái này hơi có chút vấn đề.

    Sau khi add file A là favorite, sau đó add tiếp file B, thì file A ko còn là favorite nữa, còn mỗi 1 mình file B :(

    ReplyDelete
  2. Đã giải quyết được vấn đề bằng cách cố giữ lại các favorite cũ :(

    ReplyDelete