Pages enfant
  • Installation guide - esup-news

Esup-News Portlet - Installation Guide

Autors : Julien Gribonvald

Important note

This application is working with these requirements :

  • Java 1.6
  • uPortal 2.6 only for version <= 0.2.0 and uPortal 3.2 compatible since version 0.2.1
  • If using MySQL InnoDB mod is required
  • All tests and scripts are made to works with charset UTF-8 (database and tables with utf-8).

To work in uPortal V4 you need to make these modifications (after activating compatibility 3.2):

  • delete in include.jsp <c:set var="pltc_target">...</c:set>
  • modify in include.jsp <c:set var="portletParamPrefixe" value="pP_" /> replace the value "pltp_" by "pP_"
  • replace extLib/portlet-api-1.0.jar by portlet-api_2.0.jar

Installation

Installing the portlet

  • unzip the file in a working directory
  • make a copy of
    • build_exemple.properties to build.properties
    • properties/news.properties.exemple to properties/news.properties
    • properties/log4j.properties to log4j.properties
      and adapt these files (see on next sections for more details)
  • Initializing the database
    • ant db-init

      This Command will erase all existing data in your database !!!!
      Your database (configured in build.properties) must exists.

  • Updating the database
    • select the script of you version for the update in build.properties with property db.filename
    • ant db-update
  • Deploying the application
    • ant init
    • ant deploy

Configuration

file build.properties

Description of properties

  • app.name=esup-news
    used to deploy the application with this name in webapps and will be used to define the portlet definition ID = <app.name>.news, here will be esup-news.news, this parameter is useful for the portlet declaration in the portal.
  • db.type =mysql
    The db type should be mysql or postgresql, it's useful to know which sql script to use for the database initialisation and all ibatis mapping files (xml files) to use for the DAO.
  • db.filename =
    This property is useful to know wich sql script to use to make the update of your actual database, uncomment/comment only the good script corresponding to your database type and application last version.
  • attachments.activate=true
    To activate or not the possibility to join attachments in news.
  • deploy.update-esco=false
    This property should stay to false, if passed to true it will act as a custom update wish will replace all files in build directory by these on the update-esco directory. Actually update-esco contains jsp where it force the the option rss to yes and the access option to public.
  • app.compatibility_3_2=true
    To deploy the application in compatibility mode with an uPortal 3.2 version.

file properties/news.properties

#ldap properties
ldap.url=ldap://ldap.univ.fr:389
ldap.base=ou=people,dc=univ,dc=fr
ldap.username=cn=admin,ou=administrateurs,dc=univ,dc=fr
ldap.password=*****
ldap.anonymousReadOnly=false

Define your LDAP configuration with these properties.
These properties are used in the Spring bean named "contextSource" and defined in web-root/WEB-INF/context/dataAccessContext.xml and in web-root/AppCtxN.xml (used in cron job for mailing admins of admin task)

# LDAP attribute used for user search (cn ou sn)
ldap.userSearchAttr=cn
# LDAP attribute name list of user's attributes to show in users details
ldap.searchDisplayedAttr=displayName, mail, uid, escouai
# Id/uid attribute used to identify the user in LDAP
ldap.userId=uid
# LDAP attribute name to display the name of the user
ldap.userDisplayName=displayName
# LDAP attribute name for the user mail
ldap.userEmail=mail

# List of autorized LDAP attributes used to make filter search.
ldap.filterSearchUserAttr=escouai, ENTEleveClasses, ENTEleveGroupes, ENTAuxEnsClasses, ENTAuxEnsGroupes

For each attribute defined in these properties must be set a display I18N value, this should be done in src/messages.properties
For example for the attribute uid you should set properties :
news.label.uid = Identifier in messages_en.properties
news.label.uid = Identifiant in messages_fr.properties

To set the attribute display name the pattern is
news.label.<AttributeName> = <AttributeDisplayName>

other properties define the number of items to show in different paginated pages

Connecting with Esup-Lecture

  • Find the link to add your news in the admin view and type properties and an xml icon will get the link. You will find there all links of all types to add in esup-lecture.xml file.
  • An exemple of declaration in esup-lecture.xml :

    <context
              name = "Mes annonces"
              id = "annonces">
              <description>Mes annonces</description>
              <categoryProfilesUrl
                            url="http://your.portal.domain/esup-news/feeds/pub/rss?t=6&amp;type=DEFAULT"
                            timeout=""
                            idPrefix="news"/>
            </context>
    
  • Aucune étiquette