loadProps(ac);
return ac;
}
private static void loadProps(AccessController ac) throws BrokerException {
BrokerConfig config = Globals.getConfig();
String serviceName = ac.getServiceName();
ac.getAuthProperties().setProperty(PROP_SERVICE_NAME, ac.getServiceName());
ac.getAuthProperties().setProperty(PROP_SERVICE_TYPE,
ServiceType.getServiceTypeString(ac.getServiceType()));
//first get system wide properties
getProps(ac.getAuthProperties(),
PROP_AUTHENTICATION_PREFIX, ac.getAuthType(), null, null);
//get service instance properties - instance override system
getProps(ac.getAuthProperties(),
PROP_AUTHENTICATION_PREFIX, ac.getAuthType(),
PROP_AUTHENTICATION_AREA, serviceName);
String value = config.getProperty(PROP_SERVICE_PREFIX+serviceName+
PROP_ACCESSCONTROL_TYPE_SUFFIX);
if (value == null || value.trim().equals("")) {
value = config.getProperty(PROP_ACCESSCONTROL_TYPE);
}
if (value == null || value.trim().equals("")) {
if (ac.isAccessControlEnabled()) {
throw new BrokerException(Globals.getBrokerResources().getKString(
BrokerResources.X_ACCESSCONTROL_TYPE_NOT_DEFINED));