public abstract class GrouperConfigurationModuleBase extends Object
Modifier and Type | Field and Description |
---|---|
protected Map<String,GrouperConfigurationModuleAttribute> |
attributeCache
call retrieveAttributes() to get this
|
protected Set<String> |
extraConfigKeys
extra configs that dont match the regex or prefix
|
Constructor and Description |
---|
GrouperConfigurationModuleBase() |
Modifier and Type | Method and Description |
---|---|
void |
clearAttributeCache()
clear the attribute cache which also clears the expression language cache
|
void |
deleteConfig(boolean fromUi)
delete config
|
void |
editConfig(boolean fromUi,
StringBuilder message,
List<String> errorsToDisplay,
Map<String,String> validationErrorsToDisplay)
save the attribute in an edit.
|
String |
formatIndexes(String realConfigSuffix,
boolean hasIconfigSuffix,
String label)
format indexes to be the number or a label (take special logic)
|
String |
getCacheAttributePrefix() |
String |
getCacheEntityAttributePrefix() |
String |
getCacheFieldPrefix() |
String |
getCacheGroupAttributePrefix() |
abstract ConfigFileName |
getConfigFileName()
config file name to check for properties and metadata
|
String |
getConfigId()
config id
|
abstract String |
getConfigIdRegex()
config id regeg eg: ^(provisioner)\\.([^.]+)\\.(.*)$
|
String |
getConfigIdThatIdentifiesThisConfig()
config id that identified this config.
|
abstract String |
getConfigItemPrefix()
prefix for the properties eg: provisioner.
|
protected abstract String |
getConfigurationTypePrefix()
for each type of configuration this is the prefix for eg in subsections.
|
String |
getDescription()
get description of the external system
|
protected String |
getGenericConfigId() |
String |
getPropertySuffixThatIdentifiesThisConfig()
property suffix that will be used to identify the config eg class
|
String |
getPropertyValueThatIdentifiesThisConfig()
property value that identifies the config.
|
List<GrouperConfigurationModuleSubSection> |
getSubSections()
get subsections for the UI
|
String |
getTitle()
get title of the grouper daemon configuration
|
void |
insertConfig(boolean fromUi,
StringBuilder message,
List<String> errorsToDisplay,
Map<String,String> validationErrorsToDisplay)
save the attribute in an insert.
|
boolean |
isEnabled()
is the config enabled or not
|
boolean |
isMultiple()
can there be multiple instances of this config.
|
protected List<GrouperConfigurationModuleBase> |
listAllConfigurationsOfThisType()
get all configurations configured for this type
|
void |
populateConfigurationValuesFromUi(javax.servlet.http.HttpServletRequest request) |
protected void |
populateValuesLabelsFromOptionValueClass(Map<String,GrouperConfigurationModuleAttribute> attributesSoFar,
GrouperConfigurationModuleAttribute grouperConfigModuleAttribute) |
static List<GrouperConfigurationModuleBase> |
retrieveAllConfigurations(Set<String> classNames)
list of configured systems
|
static List<GrouperConfigurationModuleBase> |
retrieveAllConfigurationTypesHelper(Set<String> classNames)
list of systems that can be configured
|
Map<String,GrouperConfigurationModuleAttribute> |
retrieveAttributes()
retrieve attributes based on the instance.
|
Set<String> |
retrieveConfigurationConfigIds()
get a set of config ids
|
Set<String> |
retrieveConfigurationKeysByPrefix(String prefix)
get configuration names configured by prefix
|
Set<String> |
retrieveExtraConfigKeys() |
Map<String,Object> |
retrieveObjectValueSubstituteMap()
expression language substitute map
|
String |
retrieveSuffix(Pattern pattern,
String propertyName)
retrieve suffix based on the property name
|
void |
setConfigId(String configId)
config id
|
Boolean |
showAttributeOverride(String suffix) |
void |
validatePreSave(boolean isInsert,
List<String> errorsToDisplay,
Map<String,String> validationErrorsToDisplay)
validations to run before saving values into db
|
protected Set<String> extraConfigKeys
protected Map<String,GrouperConfigurationModuleAttribute> attributeCache
public boolean isEnabled()
public String getPropertySuffixThatIdentifiesThisConfig()
public String getPropertyValueThatIdentifiesThisConfig()
public String getConfigIdThatIdentifiesThisConfig()
public static List<GrouperConfigurationModuleBase> retrieveAllConfigurationTypesHelper(Set<String> classNames)
public String formatIndexes(String realConfigSuffix, boolean hasIconfigSuffix, String label)
grouperConfigModule
- realConfigSuffix
- hasIconfigSuffix
- label
- protected List<GrouperConfigurationModuleBase> listAllConfigurationsOfThisType()
public static List<GrouperConfigurationModuleBase> retrieveAllConfigurations(Set<String> classNames)
public String getConfigId()
public void setConfigId(String configId)
configId
- public void validatePreSave(boolean isInsert, List<String> errorsToDisplay, Map<String,String> validationErrorsToDisplay)
isInsert
- errorsToDisplay
- validationErrorsToDisplay
- public Map<String,Object> retrieveObjectValueSubstituteMap()
public void populateConfigurationValuesFromUi(javax.servlet.http.HttpServletRequest request)
public void clearAttributeCache()
public Map<String,GrouperConfigurationModuleAttribute> retrieveAttributes()
public abstract ConfigFileName getConfigFileName()
public abstract String getConfigItemPrefix()
public abstract String getConfigIdRegex()
public String retrieveSuffix(Pattern pattern, String propertyName)
pattern
- propertyName
- public List<GrouperConfigurationModuleSubSection> getSubSections()
protected void populateValuesLabelsFromOptionValueClass(Map<String,GrouperConfigurationModuleAttribute> attributesSoFar, GrouperConfigurationModuleAttribute grouperConfigModuleAttribute)
public Boolean showAttributeOverride(String suffix)
suffix
- public void insertConfig(boolean fromUi, StringBuilder message, List<String> errorsToDisplay, Map<String,String> validationErrorsToDisplay)
attributesToSave
- are the attributes from "retrieveAttributes" with values in there
if a value is blank, then dont save that oneerrorsToDisplay
- call from ui: guiResponseJs.addAction(GuiScreenAction.newMessage(GuiMessageType.error, message.toString()));validationErrorsToDisplay
- call from ui: guiResponseJs.addAction(GuiScreenAction.newValidationMessage(GuiMessageType.error, validationKey,
validationErrorsToDisplay.get(validationKey)));public void deleteConfig(boolean fromUi)
fromUi
- public void editConfig(boolean fromUi, StringBuilder message, List<String> errorsToDisplay, Map<String,String> validationErrorsToDisplay)
attributesFromUser
- are the attributes from "retrieveAttributes" with values in there
if a value is blank, then dont save that one (delete)errorsToDisplay
- call from ui: guiResponseJs.addAction(GuiScreenAction.newMessage(GuiMessageType.error, message.toString()));validationErrorsToDisplay
- call from ui: guiResponseJs.addAction(GuiScreenAction.newValidationMessage(GuiMessageType.error, validationKey,
validationErrorsToDisplay.get(validationKey)));public Set<String> retrieveConfigurationKeysByPrefix(String prefix)
prefix
- of config e.g. ldap.personLdap.public String getTitle()
public String getDescription()
public Set<String> retrieveConfigurationConfigIds()
protected abstract String getConfigurationTypePrefix()
protected String getGenericConfigId()
public boolean isMultiple()
public String getCacheAttributePrefix()
public String getCacheEntityAttributePrefix()
public String getCacheFieldPrefix()
public String getCacheGroupAttributePrefix()
Copyright © 2016 Internet2. All rights reserved.