Exemplo n.º 1
0
  /**
   * Adds multiple values for one property in one go. Only for datatype properties in the Query tab.
   *
   * @param user User ID
   * @param anchor Unique ID of Anchor
   * @param property Property name
   * @param values Values added by user
   * @param operator Boolean operator (and, or, not)
   * @return AnchorInfo[] with serialisable version of feedback text, empty if the user's session is
   *     expired or null if an error occurred
   */
  public AnchorInfo[] updateDate(
      String user, String anchor, String property, QueryDateValue[] values, String operator) {
    if (!userMap.containsKey(user)) return new AnchorInfo[0];

    LiberSession session = userMap.get(user);
    synchronized (session) {
      session.setLastUpdated();
      return session.updateDate(anchor, property, values, operator);
    }
  }
Exemplo n.º 2
0
  /**
   * Updates the SG with the newly added date. If it's the first date, it increments the 'last
   * operation' cntr; if it's the last, it updates and returns the feedback text.
   *
   * @param user User ID
   * @param anchor Unique ID of Anchor
   * @param property Property name
   * @param date Date value added by user
   * @param dateCntr Index number of date
   * @param updateText If true, the feedbacktext is regenerated and returned
   * @param type Session type (edit, query, browse)
   * @param key browsing session id (null if session type is EDIT)
   * @return AnchorInfo[] with serialisable version of feedback text, empty if the user's session is
   *     expired or null if updateText was false or an error occurred
   */
  public AnchorInfo[] updateDate(
      String user,
      String anchor,
      String property,
      String[] date,
      int dateCntr,
      boolean updateText,
      int type,
      String key) {
    if (!userMap.containsKey(user)) return new AnchorInfo[0];

    LiberSession session = userMap.get(user);
    synchronized (session) {
      session.setLastUpdated();
      return session.updateDate(anchor, property, date, dateCntr, updateText, type, key);
    }
  }