protected void parseTimerElements(Element timersElement, Node node) {
    if (timersElement == null) {
      return;
    }

    List<Element> timerElements = timersElement.elements("timer");

    if (timerElements.isEmpty()) {
      return;
    }

    Set<Timer> timers = new HashSet<Timer>(timerElements.size());

    for (Element timerElement : timerElements) {
      Timer timer = parseTimerElement(timerElement, false);

      timers.add(timer);
    }

    node.setTimers(timers);
  }
Пример #2
0
  @Override
  public Node buildNode(KaleoNode kaleoNode) throws PortalException, SystemException {

    Node node = createNode(kaleoNode);

    Set<Action> actions = buildActions(KaleoNode.class.getName(), kaleoNode.getKaleoNodeId());

    node.setActions(actions);

    node.setMetadata(kaleoNode.getMetadata());

    Set<Notification> notifications =
        buildNotifications(KaleoNode.class.getName(), kaleoNode.getKaleoNodeId());

    node.setNotifications(notifications);

    Set<Timer> timers = buildTimers(KaleoNode.class.getName(), kaleoNode.getKaleoNodeId());

    node.setTimers(timers);

    return node;
  }