Interface IncrementalWorklist<T extends WorklistItem>

  • Type Parameters:
    T - The type of the worklist items which are managed in the worklist.
    All Superinterfaces:
    AutoCloseable, Closeable, de.aristaflow.adept2.model.communication.ServerSideProxy, UserAttributeContainer, Worklist<T>

    public interface IncrementalWorklist<T extends WorklistItem>
    extends Worklist<T>, de.aristaflow.adept2.model.communication.ServerSideProxy
    This interface extends the normal worklist by the means for incrementally retrieving worklist items. This reduces the initial data transferred to a client. However, such a worklist can not be updated but has to be closed and retrieved again. It is crucial to really close an incremental worklist since the occupy memory and resources, especially a client/server-connection.

    An incremental worklist will not be closed automatically; it has to be closed explicitly be the requesting component. After an incremental worklist has been closed, all data retrieving methods including the ones from the super-interface will throw an IllegalArgumentException on server side and a all methods will throw a ServiceConnectionException on client side.

    Aggregating affects the worklist items and can therefore not change while iterating. It can change before an iteration takes place or as soon as the iteration reaches the first item in the list (again). However, an incremental worklist can ignore aggregation completely and return grouping items as well as group items (items being member of a group) at the same time. This is determined by Worklist.getAggregateGroups().

    See Also:
    RemoteIterator
    • Method Detail

      • getID

        UUID getID()
        The system-wide unique ID of this worklist. This ID is not necessarily persistent and may change between logons. Additionally marked as Immutable.
        Specified by:
        getID in interface Worklist<T extends WorklistItem>
        Returns:
        The ID of the worklist.
      • getRespectAggregation

        boolean getRespectAggregation()
        Gets whether this incremental worklist respects aggregation, that is, depending on whether this worklist aggregates or not, either grouping items or group items will be returned but not both. Per default, aggregation will not be respected and grouping items as well as group items will be returned.
        For obvious reasons this cannot be changed while iterating.
        Returns:
        Whether this incremental worklist respects aggregation and returns either grouping or group items.
      • getNext

        List<T> getNext​(int count)
        Gets the next specified amount of worklist items of this incremental worklist.
        Parameters:
        count - The amount of worklist items to retrieve in forward direction. This has to be > 0.
        Returns:
        The next n worklist items of this incremental worklist, where n is the specified count. In case of an insufficient amount of items less than the requested items will be returned. If there are no more next elements, null will be returned.
        Throws:
        IllegalArgumentException - If count is non-positive (<= 0), an IllegalArgumentException will be thrown.
        IllegalStateException - If this incremental worklist has been closed (explicitly or implicitly), an IllegalStateException will be thrown on server side.
        de.aristaflow.adept2.model.communication.ServiceConnectionException - If this incremental worklist has been closed (explicitly or implicitly), a ServiceConnectionException will be thrown on client side.
      • getNext

        List<T> getNext​(int count,
                        int start)
        Gets the next specified amount of worklist items of this incremental worklist starting at the designated index (0-based).
        Afterwards the cursor to the current item will be set to the index start + count, that is, getNext(n) will be the same as calling getNext(n, start + count).
        Parameters:
        count - The amount of worklist items to retrieve in forward direction. This has to be > 0.
        start - The index of the worklist item from which to retrieve the next count elements. 0 is the index of the first element. This has to be >= 0 and it must not be bigger than the amounts of items in this incremental worklist.
        Returns:
        The next n worklist items of this incremental worklist, where n is the specified count. In case of an insufficient amount of items less than the requested items will be returned. If there are no more next elements, null will be returned.
        Throws:
        IllegalArgumentException - If count is non-positive (<= 0) or start is negative (< 0) or it refers to an index that is bigger than the amount of items of this incremental worklist, an IllegalArgumentException will be thrown.
        IllegalStateException - If this incremental worklist has been closed (explicitly or implicitly), an IllegalStateException will be thrown on server side.
        de.aristaflow.adept2.model.communication.ServiceConnectionException - If this incremental worklist has been closed (explicitly or implicitly), a ServiceConnectionException will be thrown on client side.
      • getPrevious

        List<T> getPrevious​(int count)
        Gets the previous specified amount of worklist items of this incremental worklist.
        Parameters:
        count - The amount of worklist items to retrieve in backward direction. This has to be > 0.
        Returns:
        The previous n worklist items of this incremental worklist, where n is the specified count. The order corresponds to the one in the underlying data structure, that is previous items in the returned list are also previous items in the data structure. In case of an insufficient amount of previous elements remaining only the available elements will be returned. If there are no more previous elements, null will be returned.
        Throws:
        IllegalArgumentException - If count is non-positive (<= 0), an IllegalArgumentException will be thrown.
        IllegalStateException - If this incremental worklist has been closed (explicitly or implicitly), an IllegalStateException will be thrown on server side.
        de.aristaflow.adept2.model.communication.ServiceConnectionException - If this incremental worklist has been closed (explicitly or implicitly), a ServiceConnectionException will be thrown on client side.
      • close

        void close()
        Explicitly closes this incremental worklist which allows to release occupied memory and resources. Closing has to be done explicitly as soon as the worklist is not used any more.
        This method may be called several times. Implementors have to take care of this.
        Specified by:
        close in interface AutoCloseable
        Specified by:
        close in interface Closeable
        Specified by:
        close in interface de.aristaflow.adept2.model.communication.ServerSideProxy
        Throws:
        de.aristaflow.adept2.model.communication.ServiceConnectionException - If this incremental worklist has been closed (explicitly or implicitly), a ServiceConnectionException will be thrown on client side.
      • drop

        @Deprecated(since="15.0.0",
                    forRemoval=true)
        default void drop()
        Deprecated, for removal: This API element is subject to removal in a future version.
        Use close() instead.
      • equals

        static boolean equals​(Worklist<?> me,
                              Object obj)
        Implements equality on IncrementalWorklists which corresponds to the equality on Worklists except for implementing IncrementalWorklist.

        This method replaces Object.equals(Object) in a remote method call locally. Thus equality will be evaluated by the local proxy object using only properties which are immutable. So if the cached immutable values are present locally (in most cases), the equality will be evaluated without a remote call.

        Parameters:
        me - The object on which to call Worklist.equals(Object). In case of a remote invocation, this will be the proxy object.
        obj - The object with which to compare the current/other object.
        Returns:
        Whether the designated objects are equal, that is, both implement IncrementalWorklist and have the same ID.