Class DelegatingController

  • All Implemented Interfaces:
    Controller

    public class DelegatingController
    extends java.lang.Object
    implements Controller
    Control of viewer proxy. Delegates URL-methods to a missing URL recorder, and cdx control to a JobIndexCache instance combined with an ARCArchiveAccess instance.
    • Constructor Detail

      • DelegatingController

        public DelegatingController​(MissingURIRecorder mur,
                                    JobIndexCache cc,
                                    ARCArchiveAccess aaa)
        Initialise a controller with the relevant instances to control.
        Parameters:
        mur - The missing URL recorder which handles missing URL collection.
        cc - The JobIndexCache which generates an index from a list of jobs on changeIndex command.
        aaa - The ARCArchiveAccess instance to receive new cdx on changeIndex command.
        Throws:
        ArgumentNotValid - if any argument is null.
    • Method Detail

      • changeIndex

        public void changeIndex​(java.util.Set<java.lang.Long> jobSet,
                                java.lang.String label)
        Change index to use an index based on a list of jobs. Note: Does not check arguments. This is a task for the mediated classes, ArcArchiveAccess and JobIndexCache.
        Specified by:
        changeIndex in interface Controller
        Parameters:
        jobSet - List of jobs to get an index for.
        label - The label this index should be known as
      • getStatus

        public java.lang.String getStatus​(java.util.Locale locale)
        Get a human readable status of the viewer proxy.
        Specified by:
        getStatus in interface Controller
        Parameters:
        locale - The locale used to generate the string
        Returns:
        A human readable status string.