Hi Scott,
My dialect is set correctly for mysql and the services whitelist is
being stored and retrieved correctly. I think my problem has to do with
the attributeRepository bean. We want to store the allowed attributes in
the mysql database. It seems like I would use something like the following.
<bean id="attributeRepository"
class="org.jasig.services.persondir.support.jdbc.SingleRowJdbcPersonAttributeDao">
<constructor-arg index="0" ref="dataSource"/>
<constructor-arg>
<list>
<value>%u</value>
</list>
</constructor-arg>
<constructor-arg>
<value>
SELECT tamuEduPersonNetID AS , cn, tamuEduPersonUIN,
tamuEduPersonNetID, mail, telephoneNumber
FROM cas_registry
WHERE service=?
</value>
</constructor-arg>
<property name="columnsToAttributes">
<map>
<!-- Mapping between attributes (key) and Principal"s (value) -->
<entry key="cn" value="Name"/>
<entry key="tamuEduPersonUIN" value="uin"/>
<entry key="tamuEduPersonNetID" value="user" />
<entry key="mail" value="mail" />
<entry key="telephoneNumber" value="telephoneNumber" />
</map>
</property>
</bean>
Does the above make any sense as far as retrieving the allowed
attributes? One thing I need to change is the "%u" which is the
username. I need to change this to the service id, but I don't know how
to reference the service id in deployerConfigContext.xml; do you happen
to know to do that?
Thanks,
Robert Lewis
> Robert,
> Its using JPA/Hibernate to do the storage. Do you have the correct
> dialect
> set for Hibernate? I can give it a try under MySql, I think my
> notebook has
> it, but probably not until later or tomorrow.
> -Scott
> -Scott Battaglia
> PGP Public Key Id: 0x383733AA
> LinkedIn: http://www.linkedin.com/in/scottbattaglia
> On Thu, Jul 3, 2008 at 5:42 PM, Robert Lewis <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > In my services management feature of cas3.2.1, inside my java code, say
> > inside CentralAuthenticationServiceImpl.java, I am not able to retrieve
> > the allowed attributes using registeredService.getAllowedAttributes().
> > So, I am trying to follow thru where this info is stored and retrieved.
> >
> > In, add.jsp there is a submit action that submits the selected list in a
> > field, as follows.
> >
> > <form:select path="allowedAttributes" items="${availableAttributes}"
> > multiple="true" />
> >
> > and
> >
> >
> > <div class="actions">
> > <button type="submit" class="primaryAction"
> > id="submit-wf_FormGardenDemonst" value="Save Changes"><spring:message
> > code="management.services.add.button.save" /></button> or <a
> > href="manage.html" style="color:#b00;"><spring:message
> > code="management.services.add.button.cancel" /></a>
> > </div>
> >
> >
> > I don't know jsp, but it seems the allowed attributes are selected in
> > the view and submitted somewhere. I want the list of allowed attributes
> > to be stored by the serviceRegistryDao in the mysql database I have set
> > up. My services whitelist is currently being stored by
> > serviceRegistryDao, that part works. I can look in the table and I see
> > mostly everything looks correct, but there is binary stuff where the
> > allowed attributes list should be.
> >
> > So, my question is: What code takes the allowed attributes "submit"
> > action and stores the selected list in the database? Is it in
> > JpaTransactionManager or the class I configured for attributeRepository?
> >
> > Thanks,
> >
> > Robert Lewis
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas