Plugin Data Inclusion

Plugin Data Inclusion
Extension to insert external informations from SQL databases
or LDAP directories in your rich content

Authors

Anyware Services

Most recent version

1.4.0

Tracking issues

https://issues.ametys.org/browse/DATA

Download

Lastest version 

  1. Presentation
  2. Screenshots

Presentation


This extension allows the webmaster to defines connections to SQL databases or LDAP directories, and to define associated requests to get information from those connections, so the contributor can use them in his rich content.

The defined requests are written in SQL ou LDAP syntax. They can be parametrized.

Samples of requests :

  • get the list of teachers and their contact
  • get the list of staff in a service
  • get the phone number of secretariat

Screenshots

User manual

The Data sources tool allows you to define LDAP or SQL connections and queries.

Open the tool by clicking on "Data sources" button on home tab.

The tool show the tree of existing connections and queries

From this tool, you can create, edit or delete connections and/or queries.

LDAP connection

To add a LDAP connection you must enter the following parameters:

  • the name of the connection
  • the URL of LDAP server
  • the search filter (ex: objectClass=eduPerson)
  • the scope of search (object, one or sub level)
  • the administrator DN
  • the administrator password
  • the authentication method (anonymous or simple)
  • use ssl protocol

SQL connection

To add a SQL connection you must enter the following parameters:

  • the name of the connection
  • the SQL driver (ex: com.mysql.jdbc.Driver for MySQL, org.apache.derby.jbc.EmbeddedDriver)
  • the database URL (ex: jdbc:mysql://myserver/base)
  • the user login to connect to database
  • the user passwords to connect to database

LDAP requests

To add a LDAP request, select the LDAP connection and click on 'New query'

In dialog box, set :

  • the unique name for the query
  • a descriptionn sufficiently clear to facilitate its use, especially when the query is parameterized
  • the result type : simple to insert simple result in a the inline text or multiple to insert multiple result in a table
  • the name of the LDAP attributes to list, separated by commas. To use a different label for the display, enter the display name in brackets :

givenName[Lastname],sn[Firstname],mail[E-Mail address]

  • an optional constraint which can be parametrized.

Constraint not configurable:

(mail=*.com)

Constraint configurable

(supannAffectation=${affectation})

SQL requests

To add a SQL request, select the SQL connection and click on 'New query'

In dialog box, set :

  • the unique name for the query
  • a descriptionn sufficiently clear to facilitate its use, especially when the query is parameterized
  • the result type : simple to insert simple result in a the inline text or multiple to insert multiple result in a table
  • the SQL request

SQL query not configurable:

SELECT firstname AS 'Firstname', lastname AS 'LastName', mail AS 'E-Mail address', service FROM Staff

SQL query configurable:

SELECT firstname AS 'Firstname', lastname AS 'LastName', mail AS 'E-Mail address' FROM Staff WHERE service=${service}

Use queries in rich content

In edition, click on 'Add query' button to insert data from defined SQL or LDAP queries

In dialog box, choose the query in the tree :

Select the inserted icon

Set the parameters if necessary

Save the content.

Installation and download

Download

Installation

Add the plugin JAR in the WEB-INF/lib directory of your Ametys application and restart the servlet engine.

In the WEB-INF/param/cms-ribbon.xml file, in home tab, add the button of id org.ametys.datainclusion.tool.DataSources

<group label="RIBBON_TABS_TAB_HOME_GROUPS_GROUP_ADVANCED_TOOL_LABEL" icon="">
       <large></large>
       <medium>
            <control id="org.ametys.newsletter.userinterface.Newsletters"/>
            <layout size="small">
                 <control id="org.ametys.datainclusion.tool.DataSources"/>
                 <control id="org.ametys.web.userinterface.Alias"/>
            </layout>
       </medium>
       <small/>
 </group>

Compatibility

Plugin version

1.0.x

1.1.x

1.2.x

1.3.x1.4.x

Ametys 3.0.x

 

 

  

Ametys 3.1.x

 

  

Ametys 3.2.x

 

  
Ametys 3.3.x   

 
Ametys 3.3.x