...
These file contains some technical parameters (guestUser, ttl) and describe the contents displayed (contexts, category profiles). Here is the structure of this file (for more information, look at dtd esup-lecture.dtd):
Element channelConfig
...
| Bloc de code |
|---|
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE channelConfig SYSTEM "lecture-config.dtd" > <channelConfig> <!-- guestUser definition --> <guestUser> ... </guestUser> <!-- ttl definition --> <ttl> ... </ttl> <!-- contexts definition --> <context> ... </context> <context> ... </context> ... <!-- category profile definition --> <categoryProfile> ... </categoryProfile> <categoryProfile> ... </categoryProfile> ... </channelConfig> |
channelConfig is the root element, it is of course mandatory and all others elements must be described under it.
Element guestUser
...
| Bloc de code |
|---|
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE channelConfig SYSTEM "lecture-config.dtd" > <channelConfig> <guestUser>guest</guestUser> |
guestUser is an optional property. Default value is "guest".
If the current connected user name equals guestUser property, then all controls used for personalisation (change tree size buttons, mark an item as read button, edit button, etc.) are hidden.
This is used in Portlet mode when esup-lecture is used in a portal unauthenticated view.
Element ttl
...
| Bloc de code |
|---|
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE channelConfig SYSTEM "lecture-config.dtd" > <channelConfig> <ttl>0</ttl> |
...
It tunes the time in seconds the two configuration files (esup-lecture.xml and mappings.xml) will stay in cache, that is, the time between two reloadings of theses files. This allow to change the configuration files without reloading the portlet. A value of zero means no reloading.
Element context
...
| Bloc de code |
|---|
<context name = "Démonstration Esup-Lecture" id = "default"> <description>Context de démo</description> <refCategoryProfile refId="demo1"/> <refCategoryProfile refId="demo2"/> ... </context> |
...
- categoryProfilesUrl is an alternative way to declare category profiles, which are in this case defined externally. It is used in coordination with applications who are able to show urls containing categoryProfiles definitions. categoryProfilesUrl has the following attributes :
- url : The url containing categoryprofiles definitions. This url must be a xml file with a root element containing categoryprofile elements (see below), like this :
Bloc de code <?xml version="1.0" encoding="UTF-8"?> <categoryProfilesUrl> <categoryProfile>...</categoryProfile> <categoryProfile>...</categoryProfile> ... </categoryProfilesUrl>
- timeout (milliseconds) : time trying to get the categoryProfilesUrl. If unsuccessfull, a new attempt will be made after the time indicated in defaultTtl property (in seconds) of bean channel (see properties/domain/domain.xml)
- idPrefix : prefix added to categoryProfiles Ids, to avoid conflicts with other categoryProfiles definitions.
- url : The url containing categoryprofiles definitions. This url must be a xml file with a root element containing categoryprofile elements (see below), like this :
Element categoryProfile
...
| Bloc de code |
|---|
<categoryProfile name="Categorie de démo" id="demo1" urlCategory="http://partages.univ-rennes1.fr/files/partages/Services/CRI/SI/conf_lecture_gwe_ray/demo1.xml" trustCategory="no" access="public" ttl = "3600" timeout = "3000"> <visibility> ... </visibility> </categoryProfile> |
...
- id,
- name,
- urlCategory : url to get back a xml category file on a remote server
- trustCategory ( yes | no ) : If it is "yes", visibility rights used are those of remote category and sources. If it is "no", visibility rights on category and sources used are those of this category profile, defined in visibility element.
- access ( public | cas ) : access of the category is public or cas because it needs CAS proxy ticket for authentication (for more information about CAS configuration see Configuration en déploiement portlet of the ESUP-Commons documentation and CAS en mode portletof the part Utilisation de CAS (French) of the of ESUP-Lecture documentation)
- ttl (seconds) : time to live of the remote category and its sources
- timeout (milliseconds) : time trying to get the category
- visibility : define group visibility for category referenced by this category profile. It is used only if trustCategory is set to "no"
- userCanMarkRead (yes | no) : If "yes", users can mark items of the category as read ot not read. Yes by default*
Element visibility
...
| Bloc de code |
|---|
<visibility>
<allowed/>
<autoSubscribed/>
<obliged>
<group name="local.0"/>
<group .../>
...
<regular attribute="sn" value="user" />
<regular .../>
...
</obliged>
</visibility>
|
...
described by dtd category.dtd, provided by remote server, requested by urlCategory of esup-lecture.xml
element category
...
| Bloc de code |
|---|
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE category SYSTEM "category.dtd">
<category name="Différents RSS">
<description>Très belle description !</description>
<sourceProfiles>
<sourceProfile> ... </sourceProfiles>
<sourceProfile> ... </sourceProfiles>
...
</sourceProfiles>
<visibility> ... </visibility>
</category>
|
...
- a list of source profiles
- visibility : define group visibility for this category. It is used only if trustCategory attribute of referencing categoryProfile is set to "yes" else visibility of category profile is used - optional -
element sourceProfile
...
| Bloc de code |
|---|
<sourceProfile id="un" access="public" name="Incidents techniques Rennes 1" specificUserContent="no" url="http://info.cri.univ-rennes1.fr/rss/rss.php"> <visibility> ... </visibility> </sourceProfile> |
...
Servlet mode
Introduction
You can used use esup-lecture in servlet mode. In this mode you don't have the notion of Portlet preference and you can't define more than one context in your esup-lecture.xml file. In servlet mode this context must have an id with value "default" ("context" before 1.1.0 version). Example:
...
In servlet mode you can't used your portal for authentication. If you used use CAS you don't have to modify the auth.xml file but you have to adapt CAS parameters ti suit your own CAS server. For this, you will find properties :
- tomcat.host, tomcat.port in builbuild.properties file.
- casService.bean (it MUST be valued at servletCasService), ccasService.url, casService.proxyCallbackUrl in properties/config.properties file.
Remarque With these properties ant deploy will automatically make appropriate changes in your web.xml file.
...