public class JsonBackedComplexStubPersonAttributeDao
extends org.jasig.services.persondir.support.ComplexStubPersonAttributeDao
implements org.springframework.context.ApplicationListener<net.unicon.cas.addons.support.ResourceChangeDetectingEventNotifier.ResourceChangedEvent>
ComplexStubPersonAttributeDao that reads the configuration for its backingMap
property from an external JSON configuration resource. This class supports periodic reloading of the backingMap from the external
JSON resource by listening for ResourceChangedEvents and reacting to them.
The polling of the JSON resource and detecting changes is done outside of this class.| Constructor and Description |
|---|
JsonBackedComplexStubPersonAttributeDao(org.springframework.core.io.Resource personAttributesConfigFile) |
| Modifier and Type | Method and Description |
|---|---|
void |
init()
Init method un-marshals JSON representation of the person attributes.
|
void |
onApplicationEvent(net.unicon.cas.addons.support.ResourceChangeDetectingEventNotifier.ResourceChangedEvent resourceChangedEvent)
Reload person attributes when JSON config is changed.
|
appendAttributeToQuery, getAvailableQueryAttributes, getBackingMap, getPeopleForQuery, getPossibleUserAttributeNames, getQueryAttributeName, setBackingMap, setQueryAttributeNamegenerateQuery, getConfiguredUserNameAttribute, getPeopleWithMultivaluedAttributes, getQueryAttributeMapping, getResultAttributeMapping, getUnmappedUsernameAttribute, isRequireAllQueryAttributes, isUseAllQueryAttributes, mapPersonAttributes, setQueryAttributeMapping, setRequireAllQueryAttributes, setResultAttributeMapping, setUnmappedUsernameAttribute, setUseAllQueryAttributesgetPerson, getUsernameAttributeProvider, setUsernameAttributeProvider, toSeedMapgetPeople, toMultivaluedSeedpublic JsonBackedComplexStubPersonAttributeDao(org.springframework.core.io.Resource personAttributesConfigFile)
public void init()
throws Exception
Exceptionpublic void onApplicationEvent(net.unicon.cas.addons.support.ResourceChangeDetectingEventNotifier.ResourceChangedEvent resourceChangedEvent)
onApplicationEvent in interface org.springframework.context.ApplicationListener<net.unicon.cas.addons.support.ResourceChangeDetectingEventNotifier.ResourceChangedEvent>resourceChangedEvent - event representing the resource change. Might not actually correspond
to this JSON config file, so the URI of it needs to be checked first.Copyright © 2013 Unicon Inc.. All Rights Reserved.