A recent client of ours had an existing portal and CMS solution based upon the Microsoft .NET DotNetNuke (DNN) open source web content management system.

Part of the client’s system used Alfresco as a dumb image store for scanned documents but none of this was integrated. What they needed was an integrated solution providing advanced document searching, viewing and updating facilities, workflow and folder policies all seamlessly integrated into their DNN portal. The document viewing function also had to integrate with an external Acqua TiffServer to provide an embedded document viewer and the Alfresco services had be able to authenticate against the DNN system and have the same user/role/role groups permissions and localization settings as the DNN system.

We took the approach of developing a series of Java-backed Web scripts to provide XML data formatted with Freemarker. XSLT stylesheets were then written to transform the XML data model into ASP.net pages. Finally custom C# DNN integration code was developed to provide portal interface and request handling into Alfresco.

The most challenging part of the integration was the synchronization that needed to take place between the external DNN and Alfresco. But this set of requirements was a very good fit for Ixxus, as we have already developed an in-house “People Integration Framework” which allows Alfresco to seamlessly reflect/synchronize against an external system that uses either a database or an XML format to define a set of authority permissions (i.e. users, user properties - including locale, roles and groups). This framework can also provide the automatic creation of customized home and group folders with the relevant permissions based upon a set of custom defined rules as an when new users are added in external system and detected by the framework.Creating a new integration/external system reflection within Alfresco is as simple as providing the implementation for a total of eight methods in two new classes to extend our framework.

Simply provide a SomeCoPeopleExporter class that extends either our com.ixxus.people.BaseDBPeopleExporter or a com.ixxus.people.BaseXMLPeopleExporter.

somecopeopleexporter

And a SomeCoPeopleImporter that extends our com.ixxus.people.BasePeopleImporter.

somecopeopleexporter

You can also optionally have the framework automatically create custom home folder for users and group folders in Alfresco as and when new groups are added to the external system by extendingour framework classes com.ixxus.people.BaseHomeFolderProvider and com.ixxus.people.BaseGroupFolderProvider respectively with only one or two method implementations.

somecomehomefolderprovider

The implementing classes can then be easily wired into a PeopleSynchronizer bean definition within an Alfresco CronTriggerBean in the Spring configuration.

<bean id="someCoPeopleImporter" >
  <property name="serviceRegistry" ref="ServiceRegistry"/>
  <property name="authenticationService" ref="AuthenticationService"/>
  <property name="homeFolderProvider">
    <ref bean="someCoHomeFolderProvider" />
  </property>
  <property name="groupFolderProvider">
    <ref bean="someCoGroupFolderProvider" />
  </property>
</bean>

<bean >
  <property name="jobDetail">
    <bean >
      <property name="targetObject">
        <bean >
          <property name="transactionService" ref="TransactionService" />
          <property name="runAsUser" value="System" />
          <property name="command">
            <bean >
              <property name="command">
                <bean >
                  <property name="synchronizer">
                    <bean >
                      <property name="exporter" ref="someCoPeopleExporter" />
                      <property name="importer" ref="someCoPeopleImporter" />
                    </bean>
                  </property>
                </bean>
              </property>
              <property name="connectionAccessor" ref="ixxusConnectionManager" />
</bean>
          </property>
        </bean>
      </property>
      <property name="targetMethod" value="execute" />
      <property name="concurrent" value="false" />
    </bean>
  </property>
  <property name="scheduler">
    <ref bean="schedulerFactory" />
  </property>
  <property name="cronExpression">
    <!-- seconds, minutes, hours, day of month, month, day of week, year -->
    <value>0 0,15,30,45 * * * ?</value>
  </property>
</bean>