Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: a3fb842c7742a6d88bbe3b1ba813c74dd54bb122 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/*******************************************************************************
 * Copyright (c) 2010 BSI Business Systems Integration AG.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     BSI Business Systems Integration AG - initial API and implementation
 ******************************************************************************/
package org.eclipse.scout.rt.shared.services.common.bookmark;

import java.util.Map;

import org.eclipse.scout.commons.annotations.Priority;
import org.eclipse.scout.commons.exception.ProcessingException;
import org.eclipse.scout.rt.shared.security.PublishUserBookmarkPermission;
import org.eclipse.scout.rt.shared.validate.InputValidation;
import org.eclipse.scout.rt.shared.validate.IValidationStrategy;
import org.eclipse.scout.service.IService;

@Priority(-3)
@InputValidation(IValidationStrategy.PROCESS.class)
public interface IBookmarkStorageService extends IService {

  /**
   * insert, update or delete bookmarks of the current user (subject) AND global bookmarks <br>
   * check the property {@link Bookmark#getKind()} for switching
   * 
   * @return the new complete set of bookmarks with (eventually) updated ids
   */
  BookmarkData storeBookmarkData(BookmarkData data) throws ProcessingException;

  /**
   * @return all bookmarks of the current user (subject) AND global bookmarks <br>
   *         check the property {@link Bookmark#getKind()} for switching
   */
  BookmarkData getBookmarkData() throws ProcessingException;

  /**
   * copy the bookmarks contained in the folder to the {@value #INBOX_FOLDER_NAME} folder of the users
   * {@link BookmarkData#getUserBookmarks()}, {@link PublishUserBookmarkPermission}
   * <p>
   * Bookmarks are published to the {@link Bookmark#SPOOL_FOLDER_NAME} folder. Once the bookmarks are retrieved by the
   * user, that folder is copied into {@link Bookmark#INBOX_FOLDER_NAME} and the spool folder is cleared.
   * 
   * @param publishFolder
   * @param targetGroup
   *          is a map that contains for example userId=scott or something like ou=eclipse.org,
   *          department=dev
   *          It is up to the implementation to define and handle the target group parameter
   */
  @InputValidation(IValidationStrategy.NO_CHECK.class)
  void publishBookmarkData(BookmarkFolder publishFolder, Map<String, Object> targetGroup) throws ProcessingException;

}

Back to the top