Class CopyTool

  • All Implemented Interfaces:
    edu.uiuc.ncsa.security.core.Logable
    Direct Known Subclasses:
    OA2CopyTool

    public class CopyTool
    extends edu.uiuc.ncsa.security.util.cli.CLITool

    Created by Jeff Gaynor
    on 11/14/13 at 3:15 PM

    • Constructor Detail

      • CopyTool

        public CopyTool​(org.oa4mp.server.api.ServiceEnvironmentImpl srcEnv,
                        org.oa4mp.server.api.ServiceEnvironmentImpl targetEnv)
      • CopyTool

        public CopyTool()
        For use when invoked from the command line. The command line arguments will be parsed.
    • Method Detail

      • getLoader

        public edu.uiuc.ncsa.security.core.util.ConfigurationLoader<? extends edu.uiuc.ncsa.security.core.util.AbstractEnvironment> getLoader()
                                                                                                                                       throws Exception
        Specified by:
        getLoader in class edu.uiuc.ncsa.security.util.cli.CLITool
        Throws:
        Exception
      • setCopyExtension

        public void setCopyExtension​(CopyExtension copyExtension)
      • getSourceEnv

        public org.oa4mp.server.api.ServiceEnvironmentImpl getSourceEnv()
      • getTargetEnv

        public org.oa4mp.server.api.ServiceEnvironmentImpl getTargetEnv()
      • getEnv

        protected org.oa4mp.server.api.ServiceEnvironmentImpl getEnv​(String cfgFileOption,
                                                                                   String cfgNameOption)
      • doItWithState

        protected int doItWithState​(int totalRecs)
        Takes in the total number of records processed so far and returns this plus the number of records this call processes.
        Parameters:
        totalRecs -
        Returns:
      • setEnvironment

        public void setEnvironment​(edu.uiuc.ncsa.security.core.util.AbstractEnvironment environment)
        Overrides:
        setEnvironment in class edu.uiuc.ncsa.security.util.cli.CLITool
      • doIt

        public void doIt()
                  throws Exception
        Specified by:
        doIt in class edu.uiuc.ncsa.security.util.cli.CLITool
        Throws:
        Exception
      • getComponentName

        public String getComponentName()
        Specified by:
        getComponentName in class edu.uiuc.ncsa.security.util.cli.CLITool
      • getOptions

        protected org.apache.commons.cli.Options getOptions()
        Overrides:
        getOptions in class edu.uiuc.ncsa.security.util.cli.CLITool
      • help

        public void help()
        Specified by:
        help in class edu.uiuc.ncsa.security.util.cli.CLITool
      • wipeAndCopy

        public void wipeAndCopy​(edu.uiuc.ncsa.security.core.Store source,
                                edu.uiuc.ncsa.security.core.Store target)
      • initialize

        public void initialize()
                        throws Exception
        Overrides:
        initialize in class edu.uiuc.ncsa.security.util.cli.CLITool
        Throws:
        Exception