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 Pattern |
grouperLoaderOtherJobPattern
match something like this: otherJob.duo.class, otherJob.duo.quartzCron, otherJob.duo.priority
|
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 |
messagingListenerConsumerPattern
match something like this: changeLog.consumer.ldappc.class, changeLog.consumer.ldappc.quartzCron
|
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 |
checkConfig()
check the grouper config safely, log errors
|
static void |
checkConfig2() |
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 |
checkGrouperLoaderOtherJobs()
check the grouper loader other jobs 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 void |
checkJar(String name,
Set<Long> sizes,
String sampleClassName,
String manifestVersion)
check a jar
|
static void |
checkObjects()
call this to init data in grouper
|
static boolean |
checkResource(String resourcePath)
make sure a resource is on the resource path
|
static boolean |
checkResource(String resourcePath,
boolean required)
make sure a resource is on the resource path
|
static boolean |
configCheckDisabled()
if the config check is disabled
|
static boolean |
isDoneWithExtraconfig() |
static boolean |
isInCheckConfig()
return if in check config
|
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 String |
loaderMetadataStemName() |
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 void |
postSteps() |
static Map<String,String> |
typeSecuritySettings() |
static void |
waitUntilDoneWithExtraConfig() |
public static final String GROUPER_PROPERTIES_NAME
public static boolean inCheckConfig
public static Pattern grouperLoaderConsumerPattern
public static Pattern messagingListenerConsumerPattern
public static Pattern grouperLoaderOtherJobPattern
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 boolean isDoneWithExtraconfig()
public static void waitUntilDoneWithExtraConfig()
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 void checkJar(String name, Set<Long> sizes, String sampleClassName, String manifestVersion)
name
- name of the jar from groupersizes
- 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 checkResource(String resourcePath, boolean required)
resourcePath
- required
- public static boolean configCheckDisabled()
public static void checkConfig()
public static void checkConfig2()
public static void postSteps()
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 checkGrouperLoaderOtherJobs()
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 String jarVersion(Class sampleClass) throws Exception
sampleClass
- Exception
public static String manifestProperty(Class sampleClass, String[] propertyNames) throws Exception
sampleClass
- propertyNames
- that we are looking for (usually just one)Exception
public 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 boolean isInCheckConfig()
public 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
- displayExtension
- description
- logAutocreate
- public static String attributeLoaderStemName()
public static String attributeRootStemName()
public static String loaderMetadataStemName()
public static void checkObjects()
public static Stem legacyAttributeBaseStem(GrouperSession grouperSession)
grouperSession
- Copyright © 2016 Internet2. All rights reserved.