Class CopyTool
- java.lang.Object
-
- edu.uiuc.ncsa.security.util.cli.CLITool2
-
- org.oa4mp.server.admin.oauth2.base.CopyTool
-
- All Implemented Interfaces:
edu.uiuc.ncsa.security.core.Logable
- Direct Known Subclasses:
OA2CopyTool
public class CopyTool extends edu.uiuc.ncsa.security.util.cli.CLITool2
Created by Jeff Gaynor
on 11/14/13 at 3:15 PM
-
-
Field Summary
Fields Modifier and Type Field Description static String
SOURCE_CONFIG_FILE_LONG_OPTION
static String
SOURCE_CONFIG_FILE_OPTION
static String
SOURCE_CONFIG_NAME_LONG_OPTION
static String
SOURCE_CONFIG_NAME_OPTION
static String
TARGET_CONFIG_FILE_LONG_OPTION
static String
TARGET_CONFIG_FILE_OPTION
static String
TARGET_CONFIG_NAME_LONG_OPTION
static String
TARGET_CONFIG_NAME_OPTION
-
Fields inherited from class edu.uiuc.ncsa.security.util.cli.CLITool2
CONFIG_FILE_LONG_OPTION, CONFIG_FILE_OPTION, CONFIG_NAME_ACTION, CONFIG_NAME_LONG_OPTION, CONFIG_NAME_OPTION, DEBUG_LONG_OPTION, DEBUG_OPTION, DEFAULT_LOG_FILE, HELP_LONG_OPTION, HELP_OPTION, LOG_FILE_LONG_OPTION, LOG_FILE_OPTION, NO_ACTION, VERBOSE_LONG_OPTION, VERBOSE_OPTION
-
-
Constructor Summary
Constructors Constructor Description CopyTool()
For use when invoked from the command line.CopyTool(ServiceEnvironmentImpl srcEnv, ServiceEnvironmentImpl targetEnv)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
doIt()
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.String
getComponentName()
CopyExtension
getCopyExtension()
protected ServiceEnvironmentImpl
getEnv(String cfgFileOption, String cfgNameOption)
edu.uiuc.ncsa.security.core.util.ConfigurationLoader<? extends edu.uiuc.ncsa.security.core.util.AbstractEnvironment>
getLoader()
ServiceEnvironmentImpl
getSourceEnv()
ServiceEnvironmentImpl
getTargetEnv()
void
help()
void
initialize()
void
setCopyExtension(CopyExtension copyExtension)
void
setEnvironment(edu.uiuc.ncsa.security.core.util.AbstractEnvironment environment)
void
wipeAndCopy(edu.uiuc.ncsa.security.core.Store source, edu.uiuc.ncsa.security.core.Store target)
-
Methods inherited from class edu.uiuc.ncsa.security.util.cli.CLITool2
debug, defaultHelp, error, error, getBufferedReader, getConfigFile, getConfigName, getConfigurationNode, getEnvironment, getInputLine, getIoInterface, getLogfileName, getMyLogger, getOptions, hasConfigFile, hasConfigName, info, isDebugOn, isVerbose, readline, run, run, say, say2, sayv, setBufferedReader, setConfigFile, setConfigName, setConfigurationNode, setDebugOn, setInputLine, setIoInterface, setLogfileName, setMyLogger, setVerbose, warn
-
-
-
-
Field Detail
-
SOURCE_CONFIG_NAME_OPTION
public static final String SOURCE_CONFIG_NAME_OPTION
- See Also:
- Constant Field Values
-
SOURCE_CONFIG_NAME_LONG_OPTION
public static final String SOURCE_CONFIG_NAME_LONG_OPTION
- See Also:
- Constant Field Values
-
SOURCE_CONFIG_FILE_OPTION
public static final String SOURCE_CONFIG_FILE_OPTION
- See Also:
- Constant Field Values
-
SOURCE_CONFIG_FILE_LONG_OPTION
public static final String SOURCE_CONFIG_FILE_LONG_OPTION
- See Also:
- Constant Field Values
-
TARGET_CONFIG_FILE_OPTION
public static final String TARGET_CONFIG_FILE_OPTION
- See Also:
- Constant Field Values
-
TARGET_CONFIG_FILE_LONG_OPTION
public static final String TARGET_CONFIG_FILE_LONG_OPTION
- See Also:
- Constant Field Values
-
TARGET_CONFIG_NAME_OPTION
public static final String TARGET_CONFIG_NAME_OPTION
- See Also:
- Constant Field Values
-
TARGET_CONFIG_NAME_LONG_OPTION
public static final String TARGET_CONFIG_NAME_LONG_OPTION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CopyTool
public CopyTool(ServiceEnvironmentImpl srcEnv, 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 classedu.uiuc.ncsa.security.util.cli.CLITool2
- Throws:
Exception
-
getCopyExtension
public CopyExtension getCopyExtension()
-
setCopyExtension
public void setCopyExtension(CopyExtension copyExtension)
-
getSourceEnv
public ServiceEnvironmentImpl getSourceEnv()
-
getTargetEnv
public ServiceEnvironmentImpl getTargetEnv()
-
getEnv
protected 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 classedu.uiuc.ncsa.security.util.cli.CLITool2
-
doIt
public void doIt() throws Exception
- Specified by:
doIt
in classedu.uiuc.ncsa.security.util.cli.CLITool2
- Throws:
Exception
-
getComponentName
public String getComponentName()
- Specified by:
getComponentName
in classedu.uiuc.ncsa.security.util.cli.CLITool2
-
help
public void help()
- Specified by:
help
in classedu.uiuc.ncsa.security.util.cli.CLITool2
-
wipeAndCopy
public void wipeAndCopy(edu.uiuc.ncsa.security.core.Store source, edu.uiuc.ncsa.security.core.Store target)
-
-