Class SnapshotHarvestDefinition


  • public class SnapshotHarvestDefinition
    extends Object
    Contains utility methods for supporting GUI for updating snapshot harvests.
    • Field Detail

      • log

        protected static final org.slf4j.Logger log
    • Constructor Detail

      • SnapshotHarvestDefinition

        public SnapshotHarvestDefinition​(javax.inject.Provider<HarvestDefinitionDAO> hdDaoProvider,
                                         javax.inject.Provider<JobDAO> jobDaoProvider,
                                         javax.inject.Provider<ExtendedFieldDAO> extendedFieldDAOProvider,
                                         javax.inject.Provider<DomainDAO> domainDAOProvider,
                                         javax.inject.Provider<EAV> eavDAOProvider)
        Constructor.
        Parameters:
        hdDaoProvider - Provider for HarvestDefinitions
        jobDaoProvider - Provider for Jobs
        extendedFieldDAOProvider - Provider ExtendedFields
        domainDAOProvider - Provider for Domains
    • Method Detail

      • createSnapshotHarvestDefinitionWithDefaultDAOs

        public static SnapshotHarvestDefinition createSnapshotHarvestDefinitionWithDefaultDAOs()
        Returns:
        a default SnapshotHarvestDefinition
      • processRequest

        public void processRequest​(javax.servlet.jsp.PageContext context,
                                   I18n i18n)
        Extracts all required parameters from the request, checks for any inconsistencies, and passes the requisite data to the updateHarvestDefinition method for processing. If the "update" parameter is not set, this method does nothing.

        The parameters in the request are defined in Definitions-edit-snapshot-harvest.jsp.

        Parameters:
        context - The context of the web request.
        i18n - Translation information
        Throws:
        ForwardedToErrorPage - if an error happened that caused a forward to the standard error page, in which case further JSP processing should be aborted.
      • flipActive

        public boolean flipActive​(javax.servlet.jsp.PageContext context,
                                  I18n i18n)
        Flip the active status of a harvestdefinition named in the "flipactive" parameter.
        Parameters:
        context - The context of the web servlet
        i18n - Translation information
        Returns:
        True if a harvest definition changed state.