|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.grouper.misc.GrouperCheckConfig
public class GrouperCheckConfig
check the configuration of grouper to make sure things are configured right, and to give descriptive errors of the problems
Nested Class Summary | |
---|---|
static class |
GrouperCheckConfig.CheckGroupResult
result from check group |
Field Summary | |
---|---|
static java.lang.String |
GROUPER_PROPERTIES_NAME
|
static java.util.regex.Pattern |
grouperLoaderConsumerPattern
match something like this: changeLog.consumer.ldappc.class, changeLog.consumer.ldappc.quartzCron |
static java.util.regex.Pattern |
grouperLoaderOtherJobPattern
match something like this: otherJob.duo.class, otherJob.duo.quartzCron, otherJob.duo.priority |
static boolean |
inCheckConfig
if in check config |
static java.util.regex.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 java.util.regex.Pattern |
messagingListenerConsumerPattern
match something like this: changeLog.consumer.ldappc.class, changeLog.consumer.ldappc.quartzCron |
static java.util.regex.Pattern |
typeSecurityPattern
match type security match: security.typeName.wheelOnly match: security.typeName.allowOnlyGroup |
Constructor Summary | |
---|---|
GrouperCheckConfig()
|
Method Summary | |
---|---|
static boolean |
assertAndRemove(java.lang.String resourceName,
java.util.Map<java.lang.String,java.lang.String> set,
java.lang.String[] propertiesNames)
if one there, then they all must be there, and remove, return true if found one |
static java.lang.String |
attributeLoaderStemName()
return the stem name where the attribute loader attributes go, without colon on end |
static java.lang.String |
attributeRootStemName()
root stem where attributes live |
static AttributeDefName |
checkAttribute(Stem stem,
AttributeDef attributeDef,
java.lang.String extension,
java.lang.String displayExtension,
java.lang.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(java.lang.String resourceName,
java.lang.String resourceExampleName)
compare a properties file with an example file, compare all the properties |
static boolean |
checkDatabase(java.lang.String driverClassName,
java.lang.String connectionUrl,
java.lang.String dbUser,
java.lang.String dbPassword,
java.lang.String databaseDescription)
test a database connection |
static GrouperCheckConfig.CheckGroupResult |
checkGroup(GrouperSession grouperSession,
java.lang.String groupName,
boolean logError,
java.lang.Boolean autoCreate,
boolean logAutocreate,
java.lang.String displayExtension,
java.lang.String groupDescription,
java.lang.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(java.lang.String name,
long size,
java.lang.String sampleClassName,
java.lang.String manifestVersion)
check a jar |
static boolean |
checkResource(java.lang.String resourcePath)
make sure a resource is on the resource path |
static boolean |
configCheckDisabled()
if the config check is disabled |
static java.lang.String |
jarVersion(java.lang.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(java.lang.String[] args)
generate the jars to find |
static java.lang.String |
manifestProperty(java.lang.Class sampleClass,
java.lang.String[] propertyNames)
get the version from the manifest of a jar |
static java.util.Map<java.lang.String,java.lang.String> |
memberSortSearchSecuritySettings()
|
static boolean |
nonStandardProperty(java.lang.String resourceName,
java.lang.String propertyName,
boolean missingPropertyInFile)
return true if this is an exception case, dont worry about it |
static java.util.Map<java.lang.String,java.lang.String> |
typeSecuritySettings()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String GROUPER_PROPERTIES_NAME
public static boolean inCheckConfig
public static java.util.regex.Pattern grouperLoaderConsumerPattern
public static java.util.regex.Pattern messagingListenerConsumerPattern
public static java.util.regex.Pattern grouperLoaderOtherJobPattern
public static final java.util.regex.Pattern typeSecurityPattern
match type security match: security.typeName.wheelOnly match: security.typeName.allowOnlyGroup
public static final java.util.regex.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
Constructor Detail |
---|
public GrouperCheckConfig()
Method Detail |
---|
public static GrouperCheckConfig.CheckGroupResult checkGroup(GrouperSession grouperSession, java.lang.String groupName, boolean logError, java.lang.Boolean autoCreate, boolean logAutocreate, java.lang.String displayExtension, java.lang.String groupDescription, java.lang.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 back
public static void checkJar(java.lang.String name, long size, java.lang.String sampleClassName, java.lang.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(java.lang.String resourcePath)
resourcePath
-
public static boolean configCheckDisabled()
public static void checkConfig()
public static void checkGroups()
public static java.util.Map<java.lang.String,java.lang.String> typeSecuritySettings()
public static java.util.Map<java.lang.String,java.lang.String> memberSortSearchSecuritySettings()
public static void checkGrouperDb()
public static boolean checkDatabase(java.lang.String driverClassName, java.lang.String connectionUrl, java.lang.String dbUser, java.lang.String dbPassword, java.lang.String databaseDescription)
driverClassName
- connectionUrl
- dbUser
- dbPassword
- databaseDescription
- friendly error description when there is a problem
public static void checkGrouperLoaderConfigDbs()
public static void checkGrouperLoaderOtherJobs()
public static void checkGrouperLoaderConsumers()
public static boolean assertAndRemove(java.lang.String resourceName, java.util.Map<java.lang.String,java.lang.String> set, java.lang.String[] propertiesNames)
resourceName
- set
- of properties that match this patternpropertiesNames
-
public static void main(java.lang.String[] args) throws java.lang.Exception
args
-
java.lang.Exception
public static java.lang.String jarVersion(java.lang.Class sampleClass) throws java.lang.Exception
sampleClass
-
java.lang.Exception
public static java.lang.String manifestProperty(java.lang.Class sampleClass, java.lang.String[] propertyNames) throws java.lang.Exception
sampleClass
- propertyNames
- that we are looking for (usually just one)
java.lang.Exception
public static boolean nonStandardProperty(java.lang.String resourceName, java.lang.String propertyName, boolean missingPropertyInFile)
resourceName
- propertyName
- missingPropertyInFile
- true if missing property in file, false if
extra property in file
public static void checkConfigProperties(java.lang.String resourceName, java.lang.String resourceExampleName)
resourceName
- resourceExampleName
- public static AttributeDefName checkAttribute(Stem stem, AttributeDef attributeDef, java.lang.String extension, java.lang.String displayExtension, java.lang.String description, boolean logAutocreate)
stem
- attributeDef
- extension
- description
- displayExtension
- logAutocreate
-
public static java.lang.String attributeLoaderStemName()
public static java.lang.String attributeRootStemName()
public static void checkAttributes()
public static Stem legacyAttributeBaseStem(GrouperSession grouperSession)
grouperSession
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |