public class GrouperInstaller extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GrouperInstaller.GrouperDirectories
structure and logic to locate where grouper is installed (or will be?)
|
static class |
GrouperInstaller.GrouperInstallerAdminAction |
static class |
GrouperInstaller.GrouperInstallerAdminManageService |
static class |
GrouperInstaller.GrouperInstallerAdminManageServiceAction |
static class |
GrouperInstaller.GrouperInstallerDevelopAction |
static class |
GrouperInstaller.GrouperInstallerMainFunction
main function of grouper installer
|
static class |
GrouperInstaller.GrouperInstallerManageAction |
static class |
GrouperInstaller.GrouperInstallerPatchAction |
static class |
GrouperInstaller.GrouperInstallerPatchStatus |
static class |
GrouperInstaller.GrouperInstallerUpgradeTaskAction |
| Constructor and Description |
|---|
GrouperInstaller() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addToFile(File file,
String line,
int lineNumber,
String description)
add a line to a file.
|
static void |
addToXmlFile(File file,
String addAfterThisRegex,
String[] mustPassTheseRegexes,
String newValue,
String description)
add something to an xml file
|
File |
backupAndCopyFile(File newFile,
File existingFile,
boolean printDetails) |
File |
backupAndDeleteFile(File file,
boolean printDetails) |
File |
bakFile(File existingFile) |
static Set<String> |
configPropertyDuplicates(File file1,
File file2) |
void |
configureTomcatUriEncoding(File serverXmlFile) |
void |
convertEhcacheBaseToProperties(File ehcacheBaseFile) |
static void |
convertEhcacheXmlToProperties(File grouperCacheBasePropertiesFile,
File grouperCachePropertiesFile,
URL ehcacheXmlUrl) |
static void |
convertSourcesXmlToProperties(File subjectPropertiesFile,
URL sourcesXmlUrl) |
void |
copyFiles(String fromDirString,
String toDirString,
Set<String> relativePathsToIgnore)
copy files if they are different from one place to another, print out statuses
|
static boolean |
copyJarFileIfNotExists(File sourceFile,
File destinationFile,
boolean onlyIfDifferentContents,
boolean ignoreWhitespace)
Copy a jar file to another file.
|
static void |
dos2unix(Collection<File> files,
String fileNameInPrompt,
String configSuffixAutorun)
run dos2unix on a file
|
static void |
dos2unix(File file,
String fileNameInPrompt,
String configSuffixAutorun)
run dos2unix on a file
|
void |
downloadAndBuildClient() |
void |
downloadAndConfigureApi() |
void |
downloadAndConfigureUi() |
void |
downloadAndUntarWs() |
void |
downloadAndUnzipAnt() |
File |
downloadAndUnzipGrouperSource(String branchName) |
void |
downloadAndUnzipMaven() |
File |
downloadAndUnzipPatch(String patchName) |
File |
downloadAndUnzipPspSource(String branchName) |
static Boolean |
editFile(File file,
String valueRegex,
String[] lineMustHaveRegexes,
String[] lineCantHaveRegexes,
String newValue,
String description)
edit a property in a property file
|
static Boolean |
editFile(File file,
String valueRegex,
String[] lineMustHaveRegexes,
String[] lineCantHaveRegexes,
String newValue,
String description,
boolean addAttributeIfNotExists,
String newAttributeName)
edit a property in a property file
|
static void |
editPropertiesFile(File file,
String propertyName,
String propertyValue,
boolean createFileIfNotExist)
edit a property in a property file
|
static Boolean |
editXmlFileAttribute(File file,
String elementName,
Map<String,String> elementMustHaveAttributeAndValue,
String newAttributeName,
String newValue,
String description)
edit an xml file attribute in a xml file
|
void |
gshExcutableAndDos2Unix(String binDirLocation) |
void |
gshExcutableAndDos2Unix(String binDirLocation,
String specify) |
void |
log4jDebugSql(String log4jLocation) |
static void |
main(String[] args) |
static void |
mergeEhcacheXmlFiles(File newEhcacheExampleFile,
File existingEhcacheExampleFile,
File existingEhcacheFile) |
static Object |
promptForEnum(String prompt,
String configKey,
Class<?> theClass)
try 10 times to get enum
|
static Object |
promptForEnum(String prompt,
String configKey,
Class<?> enumClass,
Object theDefault,
String configKeyForDefault)
try 10 times to get enum
|
void |
removeLegacyHibernateProperties(String hibernateFileLocation) |
void |
upgradeWebXml(File newWebXml,
File existingWebXml)
upgrade a web.xml file
|
static String |
xmlElementValue(Element parent,
String subElementName,
boolean required,
String descriptionForError)
get a subelement value.
|
static Map<String,String> |
xmlNodeAttributeDifferences(Element baseElement,
Element configuredElement) |
public void convertEhcacheBaseToProperties(File ehcacheBaseFile)
ehcacheBaseFile - public static void main(String[] args)
args - public static Object promptForEnum(String prompt, String configKey, Class<?> theClass)
prompt - configKey - theClass - public static Object promptForEnum(String prompt, String configKey, Class<?> enumClass, Object theDefault, String configKeyForDefault)
prompt - configKey - enumClass - theDefault - configKeyForDefault - public void upgradeWebXml(File newWebXml, File existingWebXml)
newWebXml - existingWebXml - public void copyFiles(String fromDirString, String toDirString, Set<String> relativePathsToIgnore)
fromDirString - where to copy files fromtoDirString - where to copy files torelativePathsToIgnore - public File backupAndCopyFile(File newFile, File existingFile, boolean printDetails)
newFile - existingFile - printDetails - public File backupAndDeleteFile(File file, boolean printDetails)
file - printDetails - public static Set<String> configPropertyDuplicates(File file1, File file2)
file1 - file2 - public File downloadAndUnzipPatch(String patchName)
patchName - e.g. grouper_v2_2_1_api_patch_0.tar.gzpublic File downloadAndUnzipGrouperSource(String branchName)
branchName - public File downloadAndUnzipPspSource(String branchName)
branchName - public void downloadAndUnzipAnt()
public void downloadAndUnzipMaven()
public void downloadAndUntarWs()
public void downloadAndConfigureUi()
public void downloadAndConfigureApi()
public void gshExcutableAndDos2Unix(String binDirLocation)
binDirLocation - which includes trailing slashpublic static void dos2unix(File file, String fileNameInPrompt, String configSuffixAutorun)
file - fileNameInPrompt - configSuffixAutorun - public static void dos2unix(Collection<File> files, String fileNameInPrompt, String configSuffixAutorun)
files - fileNameInPrompt - e.g. gsh.shconfigSuffixAutorun - suffix after grouperInstaller.autorun.dos2unix in properties filepublic void gshExcutableAndDos2Unix(String binDirLocation, String specify)
binDirLocation - which includes trailing slashspecify - if specifying locationpublic void removeLegacyHibernateProperties(String hibernateFileLocation)
hibernateFileLocation - public void log4jDebugSql(String log4jLocation)
log4jLocation - public void downloadAndBuildClient()
public void configureTomcatUriEncoding(File serverXmlFile)
serverXmlFile - public static void mergeEhcacheXmlFiles(File newEhcacheExampleFile, File existingEhcacheExampleFile, File existingEhcacheFile)
newEhcacheExampleFile - existingEhcacheExampleFile - existingEhcacheFile - public static Map<String,String> xmlNodeAttributeDifferences(Element baseElement, Element configuredElement)
baseElement - configuredElement - public static boolean copyJarFileIfNotExists(File sourceFile, File destinationFile, boolean onlyIfDifferentContents, boolean ignoreWhitespace)
sourceFile - destinationFile - onlyIfDifferentContents - true if only saving due to different contents. Note, this is only for non-binary files!ignoreWhitespace - true to ignore whitespace in comparisonspublic static Boolean editFile(File file, String valueRegex, String[] lineMustHaveRegexes, String[] lineCantHaveRegexes, String newValue, String description)
file - valueRegex - lineMustHaveRegexes - lineCantHaveRegexes - newValue - description - of change for sys out printpublic static Boolean editFile(File file, String valueRegex, String[] lineMustHaveRegexes, String[] lineCantHaveRegexes, String newValue, String description, boolean addAttributeIfNotExists, String newAttributeName)
file - valueRegex - lineMustHaveRegexes - lineCantHaveRegexes - newValue - description - of change for sys out printaddAttributeIfNotExists - if attribute isnt there, then if true, then add the attributenewAttributeName - if adding new attribute, this is the namepublic static void addToFile(File file, String line, int lineNumber, String description)
file - line - (not ending in newline)lineNumber - 1 indexed. If not exist, add to end of filedescription - is a description of what was just changedpublic static void addToXmlFile(File file, String addAfterThisRegex, String[] mustPassTheseRegexes, String newValue, String description)
file - addAfterThisRegex - mustPassTheseRegexes - newValue - description - of change for sys out printpublic static void editPropertiesFile(File file, String propertyName, String propertyValue, boolean createFileIfNotExist)
file - propertyName - propertyValue - createFileIfNotExist - public static void convertEhcacheXmlToProperties(File grouperCacheBasePropertiesFile, File grouperCachePropertiesFile, URL ehcacheXmlUrl)
grouperCacheBasePropertiesFile - grouperCachePropertiesFile - ehcacheXmlUrl - public static String xmlElementValue(Element parent, String subElementName, boolean required, String descriptionForError)
parent - subElementName - required - descriptionForError - public static void convertSourcesXmlToProperties(File subjectPropertiesFile, URL sourcesXmlUrl)
subjectPropertiesFile - sourcesXmlUrl - public static Boolean editXmlFileAttribute(File file, String elementName, Map<String,String> elementMustHaveAttributeAndValue, String newAttributeName, String newValue, String description)
file - elementName - elementMustHaveAttributeAndValue - newValue - description - of change for sys out printnewAttributeName - if adding new attribute, this is the nameCopyright © 2016 Internet2. All rights reserved.