Class ChildApplicationObjectIterator

  • All Implemented Interfaces:
    Iterator<ApplicationObject>

    public class ChildApplicationObjectIterator
    extends com.redwood.scheduler.infrastructure.collections.IteratorConcatenator<ApplicationObject>
    Small helper class for retrieving all ApplicationObject instances that belong to a particular application.
    • Constructor Detail

      • ChildApplicationObjectIterator

        public ChildApplicationObjectIterator​(Application application,
                                              boolean includeBranchedDefinitions)
        Construct an iterator over the child objects of an application.
        Parameters:
        application - the application whose children should be enumerated.
        includeBranchedDefinitions - If true, all children should be enumerated whereas if false then for types that can be branched (BranchedUniqueNamedApplicationObject) only master versions should be included.
    • Method Detail

      • getChildApplicationObjectIterators

        public static Iterator<ApplicationObject>[] getChildApplicationObjectIterators​(Application application,
                                                                                       boolean includeBranchedDefinitions)
        Retrieve an array of iterators for the child objects of an application. Each element in the returned array is an iterator over a different type of ApplicationObject.
        Parameters:
        application - the application whose children should be enumerated.
        includeBranchedDefinitions - If true, all children should be enumerated whereas if false then for types that can be branched (BranchedUniqueNamedApplicationObject) only master versions should be included.
        Returns:
        an array of iterators that enumerate the application's children.
      • getApplicationAndDescendents

        public static Iterator<ApplicationObject> getApplicationAndDescendents​(Application application,
                                                                               boolean includeBranchedDefinitions)
        Return an iterator over this application and all descendants in the application hierarchy.
        Parameters:
        application - the application whose children should be enumerated.
        includeBranchedDefinitions - If true, all children should be enumerated whereas if false then for types that can be branched (BranchedUniqueNamedApplicationObject) only master versions should be included.
        Returns:
        an iterator over the application and all descendants.