Search in sources :

Example 1 with WOEvent

use of com.webobjects.appserver.WOEvent in project wonder-slim by undur.

the class WOEventDisplayPage method webEventDuration.

public int webEventDuration() {
    int i, n, time;
    _cacheWebEofEvents();
    n = (webEvents != null) ? webEvents.count() : 0;
    for (i = 0, time = 0; i < n; i++) {
        EOEvent e = (EOEvent) webEvents.objectAtIndex(i);
        if (e instanceof WOEvent)
            time = time + (int) e.durationWithoutSubevents();
    }
    return time;
}
Also used : EOEvent(com.webobjects.eocontrol.EOEvent) WOEvent(com.webobjects.appserver.WOEvent)

Example 2 with WOEvent

use of com.webobjects.appserver.WOEvent in project wonder-slim by undur.

the class WOEventDisplayPage method _cacheWebEofEvents.

public void _cacheWebEofEvents() {
    if (webEvents != null)
        return;
    NSArray allCenters = EOEventCenter.allEventsForAllCenters();
    int halfCount = allCenters.count() / 2;
    webEvents = new NSMutableArray(halfCount);
    eofEvents = new NSMutableArray(halfCount);
    Enumeration anEnumerator = allCenters.objectEnumerator();
    while (anEnumerator.hasMoreElements()) {
        EOEvent e = (EOEvent) anEnumerator.nextElement();
        if (e instanceof WOEvent)
            webEvents.addObject(e);
        else
            eofEvents.addObject(e);
    }
}
Also used : EOEvent(com.webobjects.eocontrol.EOEvent) WOEvent(com.webobjects.appserver.WOEvent) Enumeration(java.util.Enumeration) NSArray(com.webobjects.foundation.NSArray) NSMutableArray(com.webobjects.foundation.NSMutableArray)

Example 3 with WOEvent

use of com.webobjects.appserver.WOEvent in project wonder-slim by undur.

the class WOEventDisplayPage method eofEventDuration.

public int eofEventDuration() {
    int i, n, time;
    _cacheWebEofEvents();
    n = (eofEvents != null) ? eofEvents.count() : 0;
    for (i = 0, time = 0; i < n; i++) {
        EOEvent e = (EOEvent) eofEvents.objectAtIndex(i);
        if (!(e instanceof WOEvent))
            time = time + (int) e.durationWithoutSubevents();
    }
    return time;
}
Also used : EOEvent(com.webobjects.eocontrol.EOEvent) WOEvent(com.webobjects.appserver.WOEvent)

Aggregations

WOEvent (com.webobjects.appserver.WOEvent)3 EOEvent (com.webobjects.eocontrol.EOEvent)3 NSArray (com.webobjects.foundation.NSArray)1 NSMutableArray (com.webobjects.foundation.NSMutableArray)1 Enumeration (java.util.Enumeration)1