Package org.sakaiproject.entitybroker.util.spring

Class Summary
BeanCollectorAutoRegistrar This will collect the autoregistered beans and place them into all the locations which requested them
BeanCollectorAutoRegistrar.OrderComparator Comparator to order the collected beans based on order or use default order otherwise
EntityPropertiesServiceSpringImpl This service allows us to track all the properties files related to describing the capabilities of our entities and the entities themselves, it allows lookup of strings as well
NOTE: Depends on spring and extends the spring based message bundle
EntityProviderAutoRegistrar Finds and registers any EntityProvider implementation which also implements AutoRegisterEntityProvider
ResourceFinder Takes a path or list of paths to resources and turns them into different things (file/IS/resource), this also allows us to look on a relative or absolute path and will automatically check the typical places one might expect to put sakai config files
Checks the environmental and file paths first and then defaults to checking the classloaders
Allows us to find resources in our pack since the Sakai context classloader is wrong, too bad it is not correct, that would be cool, but it is wrong and it is not cool

Sample usage: <property name="configLocation"> <bean class="org.sakaiproject.entitybroker.impl.util.ResourceFinder" factory-method="getResource"> <constructor-arg value="ehcache.xml" /> </bean> </property> Just call whichever get* method you want to depending on the needed output
You can also get arrays of resources at once like so: <property name="mappingLocations"> <bean class="org.sakaiproject.entitybroker.impl.util.ResourceFinder" factory-method="getResources"> <constructor-arg> <list> <value>org/sakaiproject/hierarchy/dao/hbm/HierarchyPersistentNode.hbm.xml</value> <value>org/sakaiproject/hierarchy/dao/hbm/HierarchyNodeMetaData.hbm.xml</value> </list> </constructor-arg> </bean> </property>
 



Copyright © 2007-2012 CARET, University of Cambridge. All Rights Reserved.