| Volet | ||
|---|---|---|
| ||
Esup-News Portlet - Installation GuideAutors : Julien Gribonvald |
| Sommaire | ||||||
|---|---|---|---|---|---|---|
|
Important note
This application is working with these requirments 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
- Download esup-news<version>.zip from https://sourcesup.cru.fr/frs/?group_id=806
...
- Initializing the database
ant db-init
Remarque 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 usefull useful for the portlet declaration in the portal. - db.type =mysql
The db type should be mysql or postgresql, it's usefull useful to know wich 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 usefull 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 custum 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
| Bloc de code |
|---|
#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 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)
| Bloc de code |
|---|
# 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 |
...
| Info |
|---|
| Remarque |
For each attribute defined in these properties must be set a display I18N value, this should be done in src/messages.properties To set the attribute display name the pattern is |
| Remarque |
|---|
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 :
Bloc de code <context name = "Mes annonces" id = "annonces"> <description>Mes annonces</description> <categoryProfilesUrl url="http://your.portal.domain/esup-news/feeds/pub/rss?t=6&type=DEFAULT" timeout="" idPrefix="news"/> </context>