Class CopyTool
- java.lang.Object
-
- edu.uiuc.ncsa.security.util.cli.CLITool
-
- org.oa4mp.server.admin.myproxy.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.CLITool
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.CLITool
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
-
-
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 org.oa4mp.server.api.ServiceEnvironmentImpl
getEnv(String cfgFileOption, String cfgNameOption)
edu.uiuc.ncsa.security.core.util.ConfigurationLoader<? extends edu.uiuc.ncsa.security.core.util.AbstractEnvironment>
getLoader()
protected org.apache.commons.cli.Options
getOptions()
org.oa4mp.server.api.ServiceEnvironmentImpl
getSourceEnv()
org.oa4mp.server.api.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.CLITool
checkAction, debug, defaultHelp, error, error, getAction, getBufferedReader, getCommandLine, getConfigFile, getConfigurationNode, getEnvironment, getIoInterface, getLogfileName, getMyLogger, getOptions, hasOption, info, isDebugOn, isVerbose, parseCommandLine, readline, run, run, say, say2, sayv, setAction, setBufferedReader, setCommandLine, setConfigFile, setConfigurationNode, setDebugOn, 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
-
-
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.CLITool
- Throws:
Exception
-
getCopyExtension
public CopyExtension getCopyExtension()
-
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 classedu.uiuc.ncsa.security.util.cli.CLITool
-
doIt
public void doIt() throws Exception
- Specified by:
doIt
in classedu.uiuc.ncsa.security.util.cli.CLITool
- Throws:
Exception
-
getComponentName
public String getComponentName()
- Specified by:
getComponentName
in classedu.uiuc.ncsa.security.util.cli.CLITool
-
getOptions
protected org.apache.commons.cli.Options getOptions()
- Overrides:
getOptions
in classedu.uiuc.ncsa.security.util.cli.CLITool
-
help
public void help()
- Specified by:
help
in classedu.uiuc.ncsa.security.util.cli.CLITool
-
wipeAndCopy
public void wipeAndCopy(edu.uiuc.ncsa.security.core.Store source, edu.uiuc.ncsa.security.core.Store target)
-
-