public class GrouperCheckConfig extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
GrouperCheckConfig.CheckGroupResult
result from check group
|
| Modifier and Type | Field and Description |
|---|---|
static String |
GROUPER_PROPERTIES_NAME |
static Pattern |
grouperLoaderConsumerPattern
match something like this: changeLog.consumer.ldappc.class, changeLog.consumer.ldappc.quartzCron
|
static boolean |
inCheckConfig
if in check config
|
static Pattern |
memberSortSearchSecurityPattern
match security for search and sort strings
match: security.member.sort.string[0-4].allowOnlyGroup
match: security.member.sort.string[0-4].wheelOnly
match: security.member.search.string[0-4].allowOnlyGroup
match: security.member.search.string[0-4].wheelOnly
|
static Pattern |
typeSecurityPattern
match type security
match: security.typeName.wheelOnly
match: security.typeName.allowOnlyGroup
|
| Constructor and Description |
|---|
GrouperCheckConfig() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
assertAndRemove(String resourceName,
Map<String,String> set,
String[] propertiesNames)
if one there, then they all must be there, and remove, return true if found one
|
static String |
attributeLoaderStemName()
return the stem name where the attribute loader attributes go, without colon on end
|
static String |
attributeRootStemName()
root stem where attributes live
|
static AttributeDefName |
checkAttribute(Stem stem,
AttributeDef attributeDef,
String extension,
String displayExtension,
String description,
boolean logAutocreate)
make sure an attribute is there or add it if not
|
static void |
checkAttributes()
make sure configured attributes are there
|
static void |
checkConfig()
check the grouper config safely, log errors
|
static void |
checkConfigProperties(String resourceName,
String resourceExampleName)
compare a properties file with an example file, compare all the properties
|
static boolean |
checkDatabase(String driverClassName,
String connectionUrl,
String dbUser,
String dbPassword,
String databaseDescription)
test a database connection
|
static GrouperCheckConfig.CheckGroupResult |
checkGroup(GrouperSession grouperSession,
String groupName,
boolean logError,
Boolean autoCreate,
boolean logAutocreate,
String displayExtension,
String groupDescription,
String propertyDescription,
Group[] groupResult)
verify that a group exists by name (dont throw exceptions)
|
static void |
checkGrouperDb()
make sure the grouper.hibernate.properties db settings are correct
|
static void |
checkGrouperLoaderConfigDbs()
check the grouper loader db configs
|
static void |
checkGrouperLoaderConsumers()
check the grouper loader consumer configs
|
static void |
checkGroups()
make sure configured groups are there
|
static void |
checkJar(String name,
long size,
String sampleClassName,
String manifestVersion)
check a jar
|
static boolean |
checkResource(String resourcePath)
make sure a resource is on the resource path
|
static boolean |
configCheckDisabled()
if the config check is disabled
|
static String |
jarVersion(Class sampleClass)
get the version from the manifest of a jar
|
static Stem |
legacyAttributeBaseStem(GrouperSession grouperSession)
get or create the legacy attribute base stem
|
static void |
main(String[] args)
generate the jars to find
|
static String |
manifestProperty(Class sampleClass,
String[] propertyNames)
get the version from the manifest of a jar
|
static Map<String,String> |
memberSortSearchSecuritySettings() |
static boolean |
nonStandardProperty(String resourceName,
String propertyName,
boolean missingPropertyInFile)
return true if this is an exception case, dont worry about it
|
static Map<String,String> |
typeSecuritySettings() |
public static final String GROUPER_PROPERTIES_NAME
public static boolean inCheckConfig
public static Pattern grouperLoaderConsumerPattern
public static final Pattern typeSecurityPattern
match type security match: security.typeName.wheelOnly match: security.typeName.allowOnlyGroup
public static final Pattern memberSortSearchSecurityPattern
match security for search and sort strings match: security.member.sort.string[0-4].allowOnlyGroup match: security.member.sort.string[0-4].wheelOnly match: security.member.search.string[0-4].allowOnlyGroup match: security.member.search.string[0-4].wheelOnly
public static GrouperCheckConfig.CheckGroupResult checkGroup(GrouperSession grouperSession, String groupName, boolean logError, Boolean autoCreate, boolean logAutocreate, String displayExtension, String groupDescription, String propertyDescription, Group[] groupResult)
grouperSession - (probably should be root session)groupName - logError - autoCreate - if auto create, or null, for grouper.properties settinglogAutocreate - displayExtension - optional, dislpay extension if creatinggroupDescription - group description if auto createpropertyDescription - for logging explaning to the user how to fix the problemgroupResult - put in an array of size one to get the group backpublic static void checkJar(String name, long size, String sampleClassName, String manifestVersion)
name - name of the jar from groupersize - that the jar should besampleClassName - inside the jarmanifestVersion - in the manifest file, which version we are expectingpublic static boolean checkResource(String resourcePath)
resourcePath - public static boolean configCheckDisabled()
public static void checkConfig()
public static void checkGroups()
public static Map<String,String> typeSecuritySettings()
public static Map<String,String> memberSortSearchSecuritySettings()
public static void checkGrouperDb()
public static boolean checkDatabase(String driverClassName, String connectionUrl, String dbUser, String dbPassword, String databaseDescription)
driverClassName - connectionUrl - dbUser - dbPassword - databaseDescription - friendly error description when there is a problempublic static void checkGrouperLoaderConfigDbs()
public static void checkGrouperLoaderConsumers()
public static boolean assertAndRemove(String resourceName, Map<String,String> set, String[] propertiesNames)
resourceName - set - of properties that match this patternpropertiesNames - public static void main(String[] args) throws Exception
args - Exceptionpublic static String jarVersion(Class sampleClass) throws Exception
sampleClass - Exceptionpublic static String manifestProperty(Class sampleClass, String[] propertyNames) throws Exception
sampleClass - propertyNames - that we are looking for (usually just one)Exceptionpublic static boolean nonStandardProperty(String resourceName, String propertyName, boolean missingPropertyInFile)
resourceName - propertyName - missingPropertyInFile - true if missing property in file, false if
extra property in filepublic static void checkConfigProperties(String resourceName, String resourceExampleName)
resourceName - resourceExampleName - public static AttributeDefName checkAttribute(Stem stem, AttributeDef attributeDef, String extension, String displayExtension, String description, boolean logAutocreate)
stem - attributeDef - extension - description - displayExtension - logAutocreate - public static String attributeLoaderStemName()
public static String attributeRootStemName()
public static void checkAttributes()
public static Stem legacyAttributeBaseStem(GrouperSession grouperSession)
grouperSession - Copyright © 2016 Internet2. All rights reserved.