{
profileClass = ServiceHelper.loadModelClass(this, "profile.impl");
locatorClass = ServiceHelper.loadModelClass(this, "locator.impl");
// get configuration parameters from Jetspeed Resources
ResourceService serviceConf =
((TurbineServices) TurbineServices.getInstance()).getResources(
ProfilerService.SERVICE_NAME);
resourceDefault =
serviceConf.getString(
CONFIG_RESOURCE_DEFAULT,
DEFAULT_CONFIG_RESOURCE_DEFAULT);
resourceExt =
serviceConf.getString(
CONFIG_RESOURCE_EXT,
DEFAULT_CONFIG_RESOURCE_EXT);
if (-1 == resourceExt.indexOf(PATH_EXTENSION_DELIMITER))
{
resourceExt = PATH_EXTENSION_DELIMITER + resourceExt;
}
useSecurity =
serviceConf.getBoolean(CONFIG_SECURITY, DEFAULT_CONFIG_SECURITY);
useRoleFallback =
serviceConf.getBoolean(
CONFIG_ROLE_FALLBACK,
DEFAULT_CONFIG_ROLE_FALLBACK);
newUserTemplate =
serviceConf.getString(
CONFIG_NEWUSER_TEMPLATE,
DEFAULT_CONFIG_NEWUSER_TEMPLATE);
newGroupTemplate =
serviceConf.getString(
CONFIG_NEWGROUP_TEMPLATE,
DEFAULT_CONFIG_NEWGROUP_TEMPLATE);
useFallbackToRoot =
serviceConf.getBoolean(CONFIG_FALLBACK_TO_ROOT, useFallbackToRoot);
useFallbackLanguage =
serviceConf.getBoolean(
CONFIG_FALLBACK_LANGUAGE,
useFallbackLanguage);
useRoleMerge = serviceConf.getBoolean(CONFIG_ROLE_MERGE, useRoleMerge);
useGroupMerge =
serviceConf.getBoolean(CONFIG_GROUP_MERGE, useGroupMerge);
if (useRoleMerge && useGroupMerge)
{
logger.warn(
"Both role and group merging are enabled. Disabling the group merging feature");
useGroupMerge = false;
}
if (useRoleMerge)
{
useRoleFallback = true;
rolemergeControl =
serviceConf.getString(
CONFIG_ROLE_MERGE_CONTROL,
DEFAULT_CONFIG_ROLE_MERGE_CONTROL);
rolemergeController =
serviceConf.getString(
CONFIG_ROLE_MERGE_CONTROLLER,
DEFAULT_CONFIG_ROLE_MERGE_CONTROLLER);
}
else if (useGroupMerge)
{
useRoleFallback = true;
groupmergeControl =
serviceConf.getString(
CONFIG_GROUP_MERGE_CONTROL,
DEFAULT_CONFIG_GROUP_MERGE_CONTROL);
groupmergeController =
serviceConf.getString(
CONFIG_GROUP_MERGE_CONTROLLER,
DEFAULT_CONFIG_GROUP_MERGE_CONTROLLER);
groupmergeSecurityref =
serviceConf.getString(CONFIG_GROUP_MERGE_SECURITYREF, null);
}
if (useFallbackLanguage == false)
{
useFallbackCountry = false;
}
else
{
useFallbackCountry =
serviceConf.getBoolean(
CONFIG_FALLBACK_COUNTRY,
useFallbackCountry);
}
try
{
mediaTypes = serviceConf.getStringArray(CONFIG_NEWUSER_MEDIA);
}
catch (Exception e)
{
logger.error("Error getting media types", e);
}