Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
LiveSite-Targeting : Extending the User Profile-how to add custom properties
System
Hi,
ENV :- Teamsite 6.7.1 SP1, Livesite 3.0.2 ,Targeting 3.0.2
I want to add some custom properties to userprofile datatype. Any idea how we can add custom properties ?
Overview of Userprofile Datatype
Targeting Data Types
User Profile. The User Profile data type provides information about a basic
LiveSite user. The base user profile includes the
following properties:
???? id. Specifies a unique id.
???? userName. Specifies the user name, such as “joesmith.”
???? firstName. Specifies the user's first name, such as “Joe.”
???? lastName. Specifies the user's last name, such as “Smith.”
etc ....
I want to add some more properties like
???? music. Specifies interest in music. "rock"
???? games. Specifies interest in games such as “cricket.”
Any pointers for this issue would be very helpful.
Thanks
Vinay
Find more posts tagged with
Comments
Migrateduser
We are struggling with the same question right now. i.e., We need to extend the Livesite User Profile to introduce another custom attribute, which in turn we intend to use within a content targeting rule (inside of a customer segment definition).
We are using the Livesite Default (database-driven) user profile store (and not any external user profile store). The question is the same - how do we extend it to introduce another attribute for the profile? What Code changes are required (do we need to extend the UserProfile or CustomUserProfile class), and what Hibernate mapping changes are required?
Any help would be appreciated.
Migrateduser
I am new to Interwoven too and trying to implement the same requirement you have.
This is what I did:
1. Added a new hibernate hbm file to iw-home/local/config/lib/content_center/livesite_customer_src/etc/conf/livesite_customer/orm/
<br><?xml version="1.0"?><br><!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "<a href="
http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd
"><br><hibernate-mapping" target="_blank">
http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd
"><br><hibernate-mapping</a> package="com.att.osb.livesite.p13n.model"><br><class name="UserPreferences" table="osb_iwpers_user" dynamic-update="true"<br> dynamic-insert="true" select-before-update="false"><br> <id name="id" type="string" node="
@Id">
;<br> <column name="id" length="25" not-null="true"/><br> <generator class="com.interwoven.livesite.hibernate.id.LiveSiteIdGenerator"/><br> </id><br> <property name="pref1" column="pref_1" type="string" length="100" node="Pref1"/><br> <property name="pref2" column="pref_2" type="string" length="100" node="Pref2"/><br> <property name="userId" column="user_id"/><br></class><br></hibernate-mapping><br>
2. I added a new java class to iw-home/local/config/lib/content_center/livesite_customer_src/src/
Class has the getters and setters
3. I added the following to p13n.UserProfile.hbm.xml in iw-home/httpd/webapps/content_center/WEB-INF/conf/livesite/orm/ directory
<br><br> <!-- Preferences - Added--><br> <one-to-one name="preferences" class="com.att.osb.livesite.p13n.model.UserPreferences" cascade="all" /><br> <!-- /Preferences --><br>
4. I created the new table in the database.
5. This is where I stopped. build.sh kept erroring with some parsing error. A couple of times i was able to build successfully, however, this time the server would not come up.
Have you had any success on your end?
Thanks