[Building Sakai] Injecting glossary

Maurer, Christopher Wayne chmaurer at iupui.edu
Tue Sep 4 12:09:07 PDT 2012


Well, I don't think you'd have to inject any beans.  You'd just need to create the dependency as mentioned below, then use one of the provided tags.
Look in here for an example:
https://source.sakaiproject.org/svn//osp/trunk/matrix/tool/src/webapp/WEB-INF/jsp/matrix/viewMatrix.jsp

You'll see a part there with
<osp-h:glossary…>
…
</osp-h:glossary>

The parts in the middle is what would be scanned for glossary terms and then hyperlinked, etc.

As I said, I'm not sure what lessonbuilder is written in or if you'd be able to utilize either of the tag technologies that are available there.  Perhaps there would be opportunity to create a third type that is either more universally useable, or at least create something that could be used in lessonbuilder.

Chris

From: Paul Wando Mungai <paulwando at gmail.com<mailto:paulwando at gmail.com>>
Date: Tuesday, September 4, 2012 2:21 PM
To: Chris Maurer <chmaurer at iupui.edu<mailto:chmaurer at iupui.edu>>
Cc: sakai-dev Developers <sakai-dev at collab.sakaiproject.org<mailto:sakai-dev at collab.sakaiproject.org>>
Subject: Re: [Building Sakai] Injecting glossary


Ok, the main issue now is how we inject the glossary class(as a bean in components.xml).

How it is injected in the glossary tool seems not to work.

On Sep 4, 2012 8:16 PM, "Maurer, Christopher Wayne" <chmaurer at iupui.edu<mailto:chmaurer at iupui.edu>> wrote:
It might not do you any good in lessonbuilder since the UI technology is different, but if you include this as a dependency:

    <dependency>

      <groupId>org.sakaiproject.osp</groupId>

      <artifactId>osp-glossary-tool-lib</artifactId>

    </dependency>

…you would then have a jsf tag as well as a jstl tag that you could use in your tool.

Chris

From: Paul Wando Mungai <paulwando at gmail.com<mailto:paulwando at gmail.com>>
Date: Tuesday, September 4, 2012 2:10 PM
To: Chris Maurer <chmaurer at iupui.edu<mailto:chmaurer at iupui.edu>>
Cc: sakai-dev Developers <sakai-dev at collab.sakaiproject.org<mailto:sakai-dev at collab.sakaiproject.org>>
Subject: Re: [Building Sakai] Injecting glossary


Yes, we want to get all the glossary terms within a site into lessonbuilder.

It would be unfortunate if this is not possible.
On Sep 4, 2012 8:06 PM, "Maurer, Christopher Wayne" <chmaurer at iupui.edu<mailto:chmaurer at iupui.edu>> wrote:
>
> That's probably not going to work.  We had always thought it'd be cool if other tools were able to use the glossary, but never made any efforts for tools outside of the osp tools to do so.
> What it your goal?  To be able to identify "glossarized" terms in a different tool like they are in the matrix tool (for example)?
>
> Chris
>
> From: Paul Wando Mungai <paulwando at gmail.com<mailto:paulwando at gmail.com>>
> Date: Thursday, August 30, 2012 10:05 AM
> To: sakai-dev Developers <sakai-dev at collab.sakaiproject.org<mailto:sakai-dev at collab.sakaiproject.org>>
> Subject: [Building Sakai] Injecting glossary
>
> I have tried to inject glossary into another tool as follows:
>
>     <!--Start glossary injection-->
>    <bean id="glossary"
>       class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
>       singleton="true">
>       <property name="transactionManager">
>         <ref bean="org.sakaiproject.springframework.orm.hibernate.GlobalTransactionManager"/>
>       </property>
>       <property name="target">
>          <ref bean="org.theospi.portfolio.help.model.GlossaryTarget"/>
>       </property>
>       <property name="transactionAttributes">
>          <props>
>             <prop key="*">PROPAGATION_REQUIRED</prop>
>          </props>
>       </property>
>    </bean>
>    <bean id="org.theospi.portfolio.help.model.GlossaryTarget"
>       class="org.theospi.portfolio.help.model.DbGlossary"
>       init-method="init" lazy-init="false">
>       <property name="sessionFactory">
>          <ref bean="org.sakaiproject.springframework.orm.hibernate.GlobalSessionFactory"/>
>       </property>
>       <property name="idManager"><ref bean="idManager"/></property>
>       <property name="url"><value>/osp-glossary-tool/glossary.osp</value></property>
>       <property name="schedulerManager">
>          <ref bean="org.sakaiproject.api.app.scheduler.SchedulerManager"/>
>       </property>
>    </bean>
>    <bean id="org.sakaiproject.entity.api.EntityProducer.ospGlossary"
>       class="org.theospi.portfolio.help.impl.GlossaryEntityProducer"
>       init-method="init"
>       destroy-method="destroy"
>       singleton="true">
>       <property name="entityManager">
>          <ref bean="org.sakaiproject.entity.api.EntityManager"/>
>       </property>
>       <property name="httpAccess">
>          <ref bean="org.sakaiproject.entity.api.HttpAccess.ospGlossary" />
>       </property>
>       <property name="glossary"><ref bean="glossary" /></property>
>    </bean>
>
>    <bean id="org.sakaiproject.entity.api.HttpAccess.ospGlossary"
>       class="org.theospi.portfolio.help.impl.GlossaryHttpAccess">
>       <property name="authzManager"><ref bean="authzManager"/></property>
>    </bean>
>    <!--End-->
>
>
> However, I get the following errors, any tips would be highly appreciated.
>
>
> 2012-08-30 15:57:39,044  WARN ContainerBackgroundProcessor[StandardEngine[Catalina]] PonderUtilCore - RSACBeanLocator Got value {TypedStringValue: value [*], target type [null]=TypedStringValue: value [PROPAGATION_REQUIRED], target type [null]} of unknown type class org.springframework.beans.factory.support.ManagedProperties: ignoring
> 2012-08-30 15:57:39,045 ERROR ContainerBackgroundProcessor[StandardEngine[Catalina]] PonderUtilCore - Error loading definition for bean org.theospi.portfolio.help.model.GlossaryTarget
> java.lang.IllegalArgumentException: Class name org.theospi.portfolio.help.model.DbGlossary for bean definition with name org.theospi.portfolio.help.model.GlossaryTarget cannot be resolved
> at uk.org.ponder.rsac.support.BeanDefUtil.convertBeanDef(BeanDefUtil.java:232)
> at uk.org.ponder.rsac.support.RBIBeanDefConverter.convertBeanDef(RBIBeanDefConverter.java:30)
> at uk.org.ponder.rsac.support.RSACBeanLocatorImpl.init(RSACBeanLocatorImpl.java:220)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
> at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:269)
> at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
> at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:219)
> at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
> at java.security.AccessController.doPrivileged(Native Method)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
> at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
> at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:880)
> at uk.org.ponder.springutil.TLABPostProcessor.setApplicationContext(TLABPostProcessor.java:91)
> at uk.org.ponder.springutil.TLABLoaderListener.afterPropertiesSet(TLABLoaderListener.java:74)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
> at org.springframework.beans.factory.support.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120904/9e8b5f9f/attachment.html 


More information about the sakai-dev mailing list