public Event addEvent(Event event) { if (event == null) { throw new IllegalArgumentException("event is null"); } if (event.getEventType() == null) { throw new IllegalArgumentException("event type is null"); } if (events == null) { events = new HashMap(); } events.put(event.getEventType(), event); event.graphElement = this; return event; }
public Event removeEvent(Event event) { Event removedEvent = null; if (event == null) { throw new IllegalArgumentException("event is null"); } if (event.getEventType() == null) { throw new IllegalArgumentException("event type is null"); } if (events != null) { removedEvent = (Event) events.remove(event.getEventType()); if (removedEvent != null) { event.graphElement = null; } } return removedEvent; }
public Event removeEvent(Event event) { Event removedEvent = null; if (event == null) { throw new IllegalArgumentException("event is null"); } if (event.getEventType() == null) { throw new IllegalArgumentException("event type is null"); } if (events != null) { removedEvent = (Event) events.remove(event.getEventType()); if (removedEvent != null) { event.graphElement = null; } } return removedEvent; }
public Event addEvent(Event event) { if (event == null) { throw new IllegalArgumentException("event is null"); } if (event.getEventType() == null) { throw new IllegalArgumentException("event type is null"); } if (events == null) { events = new HashMap(); } events.put(event.getEventType(), event); event.graphElement = this; return event; }
/** * creates a runtime action. Look up the event with * {@link GraphElement#getEvent(String)} and the action with * {@link ProcessDefinition#getAction(String)}. You can only lookup named * actions easily. */ public RuntimeAction(Event event, Action action) { this.graphElement = event.getGraphElement(); this.eventType = event.getEventType(); this.action = action; }
/** * creates a runtime action. Look up the event with * {@link GraphElement#getEvent(String)} and the action with * {@link ProcessDefinition#getAction(String)}. You can only lookup named * actions easily. */ public RuntimeAction(Event event, Action action) { this.graphElement = event.getGraphElement(); this.eventType = event.getEventType(); this.action = action; }
private void writeEvent(Element eventElement, Event event) { eventElement.addAttribute("type", event.getEventType()); if (event.hasActions()) { for (Iterator actionIter = event.getActions().iterator(); actionIter.hasNext();) { Action action = (Action) actionIter.next(); writeAction(eventElement, action); } } }
private void writeEvent(Element eventElement, Event event) { eventElement.addAttribute("type", event.getEventType()); if (event.hasActions()) { for (Iterator actionIter = event.getActions().iterator(); actionIter.hasNext();) { Action action = (Action) actionIter.next(); writeAction(eventElement, action); } } }
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Event)) return false; Event other = (Event) o; if (id != 0 && id == other.getId()) return true; return eventType.equals(other.getEventType()) && graphElement.equals(other.getGraphElement()); }
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Event)) return false; Event other = (Event) o; if (id != 0 && id == other.getId()) return true; return eventType.equals(other.getEventType()) && graphElement.equals(other.getGraphElement()); }