Folks,

cas-addons 0.7 should be available in Maven central.

This release has 2 useful components:

1) JSON-based extension of person directory's ComplexStubPersonAttributeDao
for ease of definition of complex user attribues during development cycle
and without the need to restart CAS web app when modifying these
attributes. Supports instantaneous real-time reloading. So instead of
something like this:

<bean id="attributeRepository"

class="org.jasig.services.persondir.support.ComplexStubPersonAttributeDao">
        <property name="backingMap">
            <map>
                <entry key="u1">
                    <map>
                        <entry key="firstName" value="User"/>
                        <entry key="lastName" value="One"/>
                        <entry key="eduPersonAffiliation" value="alumni"/>
                    </map>
                </entry>
                <entry key="u2">
                    <map>
                        <entry key="firstName" value="User"/>
                        <entry key="lastName" value="Two"/>
                        <entry key="eduPersonAffiliation">
                            <list>
                                <value>employee</value>
                                <value>student_current</value>
                            </list>
                        </entry>
                    </map>
                </entry>
                <entry key="u3">
                    <map>
                        <entry key="firstName" value="User"/>
                        <entry key="lastName" value="Three"/>
                        <entry key="eduPersonAffiliation">
                            <list>
                                <value>nb_employee</value>
                                <value>alumni</value>
                                <value>student_current</value>
                            </list>
                        </entry>
                    </map>
                </entry>
            </map>
        </property>
    </bean>

it would look like this in the external config file:

{

    "u1":{

             "firstName":"Json1",

             "lastName":"One",

             "eduPersonAffiliation":["alumni"]

     },

     "u2":{

             "firstName":"Json2",

             "lastName":"Two",

             "eduPersonAffiliation":["employee", "student"]

       },

      "u3":{

              "firstName":"Json3",

              "lastName":"Three",

              "eduPersonAffiliation":["alumni", "student", "employee"]

        }

}

2) Generic "resource watcher" useful for monitoring external resources e.g.
files for changes and pass along Spring Application Events when changes
detected. The above JSON person attribute DAO builds on it to support
real-time reloading.

https://github.com/Unicon/cas-addons/blob/master/src/main/java/net/unicon/cas/addons/persondir/JsonBackedComplexStubPersonAttributeDao.java

https://github.com/Unicon/cas-addons/blob/master/src/main/java/net/unicon/cas/addons/support/ResourceChangeDetectingEventNotifier.java


Cheers,

Dmitriy.

-- 
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to