Important note
This application is working with these requirments :
- Java 1.6
- uPortal 2.6
- If using MySQL InnoDB mod is required
- All tests and srcipts are made to works with charset UTF-8 (database and tables with utf-8).
Installation
Installing the portlet
- Download esup-news<version>.zip from https://sourcesup.cru.fr/frs/?group_id=806
- 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.
- ant db-init
- Updating the database
- select the script of you version for the update in build.properties
- ant db-update
- Deploying the application
- ant init
- ant deploy
Configuration
- file build.properties
Description of only some options
-
- 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 usefull for the portlet declaration in the portal. - db.type =
The db type should be mysql or postgresql, it's usefull to know wich sql script to use for the database initialisation - db.filename =
This property is usefull 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=
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 custum 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.name=esup-news
- 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=***** {code> Define your LDAP configuration with these properties. These properties are used in the Spring bean contextSource 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 exemple 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> = <DisplayValue>
other properties are to define the number of items to show in all paginated pages