composite repository for profie repository

267 views
Skip to first unread message

vkrish

unread,
Jul 27, 2010, 1:28:17 AM7/27/10
to ATG_Tech
Hi,

Iam working on a project where I have to store profile partly in LDAP
and partly in ATG GSARepository. I went through the docs, but there is
no sample xml template for the ldap repository. can anyone either
provide me one or point me to somewhere where i can get the same.


regards


vkrish

Shuchita Tiwari

unread,
Jul 27, 2010, 3:06:17 AM7/27/10
to atg_...@googlegroups.com
Hi,
 
I think if you look for path : /atg/adapter/ldap/****LDAPRepository
 
and this should be connected to profileAdapterRepository with user item descriptor.
Thanks,
Shuchita

--
You received this message because you are subscribed to the Google Groups "ATG_Tech" group.
To post to this group, send email to atg_...@googlegroups.com
To unsubscribe from this group, send email to atg_tech-u...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/atg_tech?hl=en

vkrish

unread,
Aug 2, 2010, 12:34:59 AM8/2/10
to ATG_Tech
Hi,

many people have been posting questions, but once they get the
solutions on their own, they dont share the same with the forum.
please find attached the solution for the setting up of a composite
repository.

I have setup the composite repository successfully with part of the
data on LDAP (sun server for testing purposes) and part of the data in
solid itself.

I created a new objectclass in the LDAP called as dpsuser to
accomodate the storing of the id property to facilitate ID matching
queries.

Hope this solution helps others.

the ProfileAdapterRepository.properties file

$class=atg.adapter.composite.MutableCompositeRepository
repositoryName=UserProfiles
configurationFile=/atg/userprofiling/myComposite.xml
transactionManager=/atg/dynamo/transaction/TransactionManager
groupContainer=/atg/registry/RepositoryGroups


The myComposite.xml file.

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE composite-repository-template
PUBLIC "-//Art Technology Group, Inc.//DTD Scenario Manager//EN"
'http://www.atg.com/dtds/composite-repository/composite-
repository_1.0.dtd' >

<!-- composite repository definition -->
<composite-repository-template>
<header/>
<!-- composite item descriptor definition -->
<item-descriptor name="user" default="true" display-property="login"
contributing-item-creation-policy="eager" null-contributing-item-
policy="null" link-method="static">
<!-- primary view definition -->
<primary-item-descriptor name="gsaUser" repository-nucleus-name="/atg/
userprofiling/gsa/GSAProfileRepository"
repository-item-descriptor-name="user" all-properties-propagate="true"
all-properties-queryable="true">
<property name='password' mapped-property-name="password"
exclude="true"/>
<property name='login' mapped-property-name="login" required="true"/
>
<property name='firstName' mapped-property-name="firstName"
exclude="true"/>
<property name='middleName' mapped-property-name="middleName"
exclude="true"/>
<property name='lastName' mapped-property-name="lastName"
exclude="true"/>
</primary-item-descriptor>
<!-- contributing view definition -->
<contributing-item-descriptor name="ldapUser" repository-nucleus-
name="/atg/userprofiling/ldap/LDAPProfileRepository"
repository-item-descriptor-name="user" all-properties-
propagate="true" all-properties-queryable="true">
<property name="firstName" mapped-property-name="ldapFirstName"
required="true"/>
<property name="lastName" mapped-property-name="ldapLastName"
required="true"/>
<property name='password' mapped-property-name="ldapPassword"
required="true"/>
<primary-item-descriptor-link>
<link-via-property primary="login" contributing="ldapLogin"/>
</primary-item-descriptor-link>
</contributing-item-descriptor>
</item-descriptor>

<item-descriptor name="contactInfo" display-property="address1" link-
method="static">
<primary-item-descriptor repository-item-descriptor-
name="contactInfo"
name="contactInfo" repository-nucleus-name="/atg/userprofiling/gsa/
GSAProfileRepository" all-properties-propagate="true"
all-properties-queryable="true"/>
</item-descriptor>

<item-descriptor name="mailing" link-method="static">
<primary-item-descriptor repository-item-descriptor-name="mailing"
name="contactInfo" repository-nucleus-name="/atg/userprofiling/gsa/
GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>

<item-descriptor name="mailBatch" link-method="static">
<primary-item-descriptor repository-item-descriptor-name="mailBatch"
name="mailBatch" repository-nucleus-name="/atg/userprofiling/gsa/
GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>

<item-descriptor name="mailServer" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="mailServer"
name="mailServer" repository-nucleus-name="/atg/userprofiling/gsa/
GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>

<item-descriptor name="role" link-method="static">
<primary-item-descriptor repository-item-descriptor-name="role"
name="role" repository-nucleus-name="/atg/userprofiling/gsa/
GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>

<item-descriptor name="organizationalRole" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="organizationalRole"
name="organizationalRole" repository-nucleus-name="/atg/
userprofiling/gsa/GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>

<item-descriptor name="organization" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="organization"
name="organization" repository-nucleus-name="/atg/userprofiling/
gsa/GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>

<item-descriptor name="genericFolder" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="genericFolder"
name="genericFolder" repository-nucleus-name="/atg/userprofiling/
gsa/GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>


<item-descriptor name="roleFolder" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="roleFolder"
name="roleFolder" repository-nucleus-name="/atg/userprofiling/gsa/
GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>

<!-- properties specific to Scenario Server -->

<item-descriptor name="profileSlot" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="profileSlot"
name="profileSlot" repository-nucleus-name="/atg/userprofiling/gsa/
GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>

<item-descriptor name="individualScenario" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="individualScenario"
name="individualScenario" repository-nucleus-name="/atg/
userprofiling/gsa/GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>


<item-descriptor name="collectiveScenario" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="collectiveScenario"
name="collectiveScenario" repository-nucleus-name="/atg/
userprofiling/gsa/GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>


<item-descriptor name="scenarioInfo" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="scenarioInfo"
name="scenarioInfo" repository-nucleus-name="/atg/userprofiling/
gsa/GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>


<item-descriptor name="scenarioMigrationInfo" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="scenarioMigrationInfo"
name="scenarioMigrationInfo" repository-nucleus-name="/atg/
userprofiling/gsa/GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>


<item-descriptor name="scenarioTemplateInfo" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="scenarioTemplateInfo"
name="scenarioTemplateInfo" repository-nucleus-name="/atg/
userprofiling/gsa/GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>


<item-descriptor name="collectiveScenarioTransition" link-
method="static">
<primary-item-descriptor repository-item-descriptor-
name="collectiveScenarioTransition"
name="collectiveScenarioTransition" repository-nucleus-name="/atg/
userprofiling/gsa/GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>

<item-descriptor name="individualScenarioTransition" link-
method="static">
<primary-item-descriptor repository-item-descriptor-
name="individualScenarioTransition"
name="individualScenarioTransition" repository-nucleus-name="/atg/
userprofiling/gsa/GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>


<item-descriptor name="scenarioDeletion" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="scenarioDeletion"
name="scenarioDeletion" repository-nucleus-name="/atg/
userprofiling/gsa/GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>


<item-descriptor name="scenarioMigration" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="scenarioMigration"
name="scenarioMigration" repository-nucleus-name="/atg/
userprofiling/gsa/GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>


<item-descriptor name="scenarioXref" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="scenarioXref"
name="scenarioXref" repository-nucleus-name="/atg/userprofiling/
gsa/GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>


<item-descriptor name="marker" link-method="static">
<primary-item-descriptor repository-item-descriptor-name="marker"
name="marker" repository-nucleus-name="/atg/userprofiling/gsa/
GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>

<item-descriptor name="businessProcessMarker" link-method="static">
<primary-item-descriptor repository-item-descriptor-
name="businessProcessMarker"
name="businessProcessMarker" repository-nucleus-name="/atg/
userprofiling/gsa/GSAProfileRepository"
all-properties-propagate="true" all-properties-queryable="true"/>
</item-descriptor>


</composite-repository-template>

The SQL Profile Repository file.



$class=atg.adapter.gsa.GSARepository

repositoryName=UserProfiles
componentResourceBundleName=atg.userprofiling.ProfileResources
repositoryDisplayNameResource=profileRepositoryDisplayName
definitionFiles=/atg/userprofiling/userProfile.xml
groupContainerPath=/atg/registry/RepositoryGroups
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory
transactionManager=/atg/dynamo/transaction/TransactionManager
idGenerator=/atg/dynamo/service/IdGenerator
dataSource=/atg/dynamo/service/jdbc/JTDataSource
itemDescriptorAliases=All Profiles=user
useDatabaseQueries=true
lockManager=/atg/dynamo/service/ClientLockManager


the layered userProfile.xml file

<gsa-template>
<item-descriptor name="user">

<table name="dps_user" type="primary" id-column-name="id">
<!-- <property xml-combine='remove' name="login"/>-->
<property xml-combine='remove' name="password"/>

<property xml-combine='remove' name="firstName"/>
<property xml-combine='remove' name="lastName"/>
<property xml-combine='remove' name="middleName"/>
</table>
</item-descriptor>
</gsa-template>

the LDAP repository definition file

$class=atg.adapter.ldap.LDAPRepository

# Name of repository
repositoryName=LDAPUserProfiles

# JNDIInitialContextPool used to obtain InidialDirContext objects
initialContextPool=/atg/adapter/ldap/InitialContextPool

# XML template location
definitionFile=/atg/userprofiling/ldap/ldapUserProfile.xml

# XML tools factory
XMLToolsFactory=/atg/dynamo/service/xml/XMLToolsFactory

# Used to generate ids for transient items
idGenerator=/atg/dynamo/service/IdGenerator

# Transaction manager
transactionManager=/atg/dynamo/transaction/TransactionManager

# Group registry
groupContainer=/atg/registry/RepositoryGroups

# Should the repository cache directory items? The default is true.
#cacheItems=true

# Repository item cache
itemCache=/atg/adapter/ldap/LDAPItemCache

# Should repository views cache query results? The default is false.
#cacheQueries=false

# Query cache
queryCache=/atg/adapter/ldap/LDAPQueryCache

# Should repository items cache their properties? The default is
# true.
#cacheItemProperties=true

# Should repository items prefetch their properties? If true, the
# first time any of the item's properties is accessed, all of the
# item's property values are retrieved and cached. This value is only
# used if cacheItemProperties=true. The default is true.
#prefetchItemProperties=true

# Should Dynamo be shutdown on fatal repository errors?
shutdownDynamoOnFatal=false

# How long to delay before shutting down. This value is only used if
# shutdownDynamoOnFatal=true.
shutdownDelay=30


the LDAP repository definition file

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE ldap-adapter-template
PUBLIC "-//Art Technology Group, Inc.//DTD LDAP Adapter//EN"
"http://www.atg.com/dtds/ldap/ldap_1.0.dtd">
<ldap-adapter-template>
<header>
<name>ldapUserProfile.xml</name>
<author>ATG</author>
<version>$Id$</version>
</header>
<!-- user view -->
<view name="user" default="true">
<!-- item descriptor -->
<item-descriptor name="user" display-name="User" display-
property="ldapLogin">
<!-- special properties -->
<!--<id-property name="id" in-ldap="false"/>-->
<id-property name="id" in-ldap="true" ldap-name="dpsid"/>
<object-classes-property name="objectClasses" ldap-name="objectclass"/
>
<!-- object classes -->
<object-class>top</object-class>
<object-class>person</object-class>
<object-class>organizationalPerson</object-class>
<object-class>inetorgPerson</object-class>
<object-class>dpsuser</object-class>
<!-- properties -->
<property name="ldapLogin" ldap-name="uid" data-type="string"
required="true">
<attribute name="unique" value="true"/>
</property>
<property name="ldapPassword" ldap-name="userpassword" data-
type="string" required="true" display-name="Password"
editor-class="atg.beans.PasswordPropertyEditor">
<attribute name="maxLength" value="32"/> <!-- requires 32 chars
in DB -->
<attribute name="passwordHasher" bean="/atg/adapter/ldap/
NDSPasswordHasher"/>
<attribute name="resourceBundle"
value="atg.userprofiling.UserProfileTemplateResources"/>
<attribute name="propertySortPriority" value="-6"/>
</property>
<property name="fullName" ldap-name="cn" data-type="string"
required="true"/>
<property name="ldapLastName" ldap-name="sn" data-type="string"
required="true"/>
<property name="ldapFirstName" ldap-name="givenName" data-
type="string"/>
<property name="ldapEmail" ldap-name="mail" data-type="string"/>
<property name="ldapPhone" ldap-name="telephonenumber" data-
type="string"/>
<!-- item creation -->
<!--<new-items parent-dn="ou=people,dc=vamsoft" rdn-
property="ldapLogin" allowed="true"/>-->
<new-items parent-
dn="cn=ExternalUsers,cn=Users,ou=Brazil,dc=nextel,dc=com" rdn-
property="ldapLogin"/>
</item-descriptor>
<!-- search roots -->
<!--<search-root dn="ou=people,dc=vamsoft" recursive="false" />-->
<search-root dn="cn=ExternalUsers,cn=Users,ou=Brazil,dc=nextel,dc=com"/
>
</view>
</ldap-adapter-template>









regards


vkrish









On Jul 27, 12:06 pm, Shuchita Tiwari <tiwari.shuch...@gmail.com>
wrote:
> Hi,
>
> I think if you look for path : /atg/adapter/ldap/****LDAPRepository
>
> and this should be connected to profileAdapterRepository with user item
> descriptor.
> Thanks,
> Shuchita
>
Reply all
Reply to author
Forward
0 new messages