Package edu.uiuc.ncsa.security.installer
Class InstallConfigurationImporter
- java.lang.Object
- 
- edu.uiuc.ncsa.security.installer.InstallConfigurationImporter
 
- 
 public class InstallConfigurationImporter extends Object Does the grunt work of importing from a configuration file.Created by Jeff Gaynor 
 on 6/14/24 at 7:25 AM
- 
- 
Field SummaryFields Modifier and Type Field Description static StringAPP_NAMEstatic StringATTR_CLEANUP_ON_FAILstatic StringATTR_EXECUTABLEstatic StringATTR_FAIL_ON_ERRORstatic StringATTR_HELP_ARGSstatic StringATTR_HELP_DEFAULTstatic StringATTR_HELP_EXAMPLESstatic StringATTR_HELP_SUCCESSstatic StringATTR_PREPROCESSstatic StringATTR_TYPEstatic StringATTR_UPDATEABLEstatic StringATTR_VERSION_DESCRIPTIONstatic StringATTR_VERSION_FILEstatic StringATTR_VERSION_NAMEstatic StringATTR_VERSION_NOTESstatic StringDIRECTORIESstatic StringFILESstatic StringHELP_SETstatic StringIGNORED_FILESstatic StringPERMISSIONS_FILESstatic StringSOURCE_FILEstatic StringSOURCE_URLstatic StringTARGET_DIRECTORYstatic StringTARGET_FILEstatic StringTYPE_FILE_SETstatic StringTYPE_SETUPstatic StringTYPE_ZIPstatic StringVERSION_SET
 - 
Constructor SummaryConstructors Constructor Description InstallConfigurationImporter(List setup)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoSetup(Map map)protected SingleSourceSetdoSingleDirectoryCase(Map map, String type)the YAML file may have a single directory or a list of them.static BooleangetBoolean(Map map, String key)This grabs the boolean value from a map.InstallConfigurationgetInstallConfiguration()protected ListgetList(Map map, String key)protected MapgetMap(Map map, String key)return the entry of the current configuration map cast to a mapprotected StringgetString(Map map, String key)voidinitDirs(List dirs)protected voidinitSetup(List setup)protected StringloadHelpFile(Map helpMap, String keyName)static voidmain(String[] args)Just for testing.protected voidprocessDirectories(SingleSourceSet singleSourceSet, List dirList, String type)The directories entry contains a list of directoriesprotected List<FileEntryInterface>processFileEntries(List list)protected List<FileEntryInterface>processJarEntries(List list)
 
- 
- 
- 
Field Detail- 
SOURCE_URLpublic static String SOURCE_URL 
 - 
DIRECTORIESpublic static String DIRECTORIES 
 - 
FILESpublic static String FILES 
 - 
IGNORED_FILESpublic static String IGNORED_FILES 
 - 
PERMISSIONS_FILESpublic static String PERMISSIONS_FILES 
 - 
SOURCE_FILEpublic static String SOURCE_FILE 
 - 
TARGET_FILEpublic static String TARGET_FILE 
 - 
TARGET_DIRECTORYpublic static String TARGET_DIRECTORY 
 - 
ATTR_PREPROCESSpublic static String ATTR_PREPROCESS 
 - 
ATTR_EXECUTABLEpublic static String ATTR_EXECUTABLE 
 - 
ATTR_UPDATEABLEpublic static String ATTR_UPDATEABLE 
 - 
ATTR_TYPEpublic static String ATTR_TYPE 
 - 
TYPE_SETUPpublic static String TYPE_SETUP 
 - 
TYPE_FILE_SETpublic static String TYPE_FILE_SET 
 - 
TYPE_ZIPpublic static String TYPE_ZIP 
 - 
APP_NAMEpublic static final String APP_NAME - See Also:
- Constant Field Values
 
 - 
HELP_SETpublic static final String HELP_SET - See Also:
- Constant Field Values
 
 - 
VERSION_SETpublic static final String VERSION_SET - See Also:
- Constant Field Values
 
 - 
ATTR_FAIL_ON_ERRORpublic static final String ATTR_FAIL_ON_ERROR - See Also:
- Constant Field Values
 
 - 
ATTR_CLEANUP_ON_FAILpublic static final String ATTR_CLEANUP_ON_FAIL - See Also:
- Constant Field Values
 
 - 
ATTR_VERSION_FILEpublic static final String ATTR_VERSION_FILE - See Also:
- Constant Field Values
 
 - 
ATTR_VERSION_NAMEpublic static final String ATTR_VERSION_NAME - See Also:
- Constant Field Values
 
 - 
ATTR_VERSION_DESCRIPTIONpublic static final String ATTR_VERSION_DESCRIPTION - See Also:
- Constant Field Values
 
 - 
ATTR_VERSION_NOTESpublic static final String ATTR_VERSION_NOTES - See Also:
- Constant Field Values
 
 - 
ATTR_HELP_ARGSpublic static final String ATTR_HELP_ARGS - See Also:
- Constant Field Values
 
 - 
ATTR_HELP_DEFAULTpublic static final String ATTR_HELP_DEFAULT - See Also:
- Constant Field Values
 
 - 
ATTR_HELP_EXAMPLESpublic static final String ATTR_HELP_EXAMPLES - See Also:
- Constant Field Values
 
 - 
ATTR_HELP_SUCCESSpublic static final String ATTR_HELP_SUCCESS - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
InstallConfigurationImporterpublic InstallConfigurationImporter(List setup) 
 
- 
 - 
Method Detail- 
initSetupprotected void initSetup(List setup) 
 - 
initDirspublic void initDirs(List dirs) 
 - 
doSetupprotected void doSetup(Map map) 
 - 
loadHelpFileprotected String loadHelpFile(Map helpMap, String keyName) throws IOException - Throws:
- IOException
 
 - 
doSingleDirectoryCaseprotected SingleSourceSet doSingleDirectoryCase(Map map, String type) the YAML file may have a single directory or a list of them. This processes the case that the top-level element is just a directory
 - 
processDirectoriesprotected void processDirectories(SingleSourceSet singleSourceSet, List dirList, String type) The directories entry contains a list of directories- Parameters:
- dirList-
 
 - 
processJarEntriesprotected List<FileEntryInterface> processJarEntries(List list) 
 - 
processFileEntriesprotected List<FileEntryInterface> processFileEntries(List list) 
 - 
getBooleanpublic static Boolean getBoolean(Map map, String key) This grabs the boolean value from a map. Note that this is more complex than it would seem.Boolean.parseBoolean(String)always returns, and if the argument is gibberish, it just returns false. We need the values to be true, false or null (showing unset).- Parameters:
- map-
- key-
- Returns:
 
 - 
getMapprotected Map getMap(Map map, String key) return the entry of the current configuration map cast to a map- Parameters:
- key-
- Returns:
 
 - 
getInstallConfigurationpublic InstallConfiguration getInstallConfiguration() 
 - 
mainpublic static void main(String[] args) Just for testing. Only loads everything into an instance of this object.- Parameters:
- args-
 
 
- 
 
-