| Volet | ||
|---|---|---|
| ||
Esup Lecture Portlet - Installation Guide
|
...
- Configure a new context in your application server. For example with Tomcat create a LecturePortlet.xml file in the Toncat conf/Catalina/localhost subfolder with content like this:
ATTENTION : Cf FAQ : http://www.esup-portail.org/display/PROJESUPLECTURE/FAQ+(French)?showComments=true#commentsBloc de code <Context path="/esup-lecture" docBase="D:/esupdev/esupdev-2.5-esup-2/uPortal-quick-start/webapps/esup-lecture" />
- Configure your portal to reference this portlet. For example with uPortal you can use channel manager as shown here:
Remarque Portlet definition ID is very important. Here it is esup-lecture.esup-lecture. Fisrt esup-lecture must be equal to the appliation server context name and second esup-lecture must be equal to the portlet-name of the WEB-INF/portlet.xml file.
If you don't use this default value you have to adap the "portlet-guid" parameter of "The esup-lecture portlet servlet" servlet in the WEB-INF/web.xml too.
If you don't use channel manager you can use a xml Portlet definition file. You can use this file with an uPortal ant target like ant uportal.pubchan -Dchannel=lecture-portlet.xml. For this, you have to save a lecture-portlet.xml file in the folder properties/chanpub of your uPortal distribution. This is an example of lecture-portlet.xml file :Remarque You can specify a preference with name "context" here too. See chapter 2.2.1 about context id for more information about this.
Bloc de code <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE channel-definition SYSTEM "channelDefinition.dtd"> <channel-definition> <title>lecture-portlet</title> <name>lecture-portlet</name> <fname>lecture</fname> <desc>Esup-Portail lecture portlet</desc> <type>Portlet</type> <class>org.jasig.portal.channels.portlet.CPortletAdapter</class> <timeout>15000</timeout> <hasedit>N</hasedit> <hashelp>N</hashelp> <hasabout>N</hasabout> <secure>N</secure> <locale>en_US</locale> <categories> <category>Applications</category> </categories> <groups> <group>Everyone</group> </groups> <parameters> <!-- The syntax of the portletDefinitionId is [portlet-context-name].[portlet-name] --> <parameter> <name>portletDefinitionId</name> <value>esup-lecture.esup-lecture</value> <description>The syntax of the portletDefinitionId is [portlet-context-name].[portlet-name]</description> <ovrd>N</ovrd> </parameter> <parameter> <name>PORTLET.context</name> <value>default</value> <description>The "context" Portlet preference in relationship with context@id of the esup-lecture.xml file</description> <ovrd>N</ovrd> </parameter> </parameters> </channel-definition> - Since 1.2: Import lecture.css in main portal css page.
For example with esup skin in a esup-portail package:- copy esup.css form update/uPortal/webpages/media/org/jasig/portal/layout/tab-column/xhtml-theme/esup to custom/uPortal/webpages/media/org/jasig/portal/layout/tab-column/xhtml-theme/esup/skin
- adap esup.css by adding :
Bloc de code @import url("lecture.css"); - copy lecture.css in custom/uPortal/webpages/media/org/jasig/portal/layout/tab-column/xhtml-theme/esup/skin
- use ant init deploy
...
- esup-lecture.xml: main configuration file. Contexts and CategoryProfiles definition.
It also deals with <category>.xml: remote xml file referecend by CategoryProfiles. - mappings.xml: declarations about xslt transformation for interface display
- portlet.xml: it needs declaration of portal user attributes used by Lecture Portlet
- auth.xml: auth configuration
Remarque XML Elements or attributes not explained here (but in dtd) implements features that are not yet supported.
esup-lecture.xml and <category>.xml
These files describe contexts, category profiles and userId definition. Here is the structure of this file (for more information, look at dtd lecture-config.dtd):
- element channelConfig in esup-lecture.xml:
Bloc de code <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE channelConfig SYSTEM "lecture-config.dtd" > <channelConfig> <!-- contexts definition --> <context> ... </context> <context> ... </context> ... <!-- category profile definition --> <categoryProfile> ... </categoryProfile> <categoryProfile> ... </categoryProfile> ... </channelConfig>
- element context:
Here are defined context with:Bloc de code <context name = "Démonstration Esup-Lecture" id = "default"> <description>Context de démo</description> <refCategoryProfile refId="demo1"/> <refCategoryProfile refId="demo2"/> ... </context>
- id (You can use a specific context by configuring your portlet with a portlet preference. This portlet preference must have a name "context" and a value equals to the id you want for this portlet. If you don't define any context preference for your portlet then context with id "default" is used. With this mechanism you can define many channels with many contexts definitions in your portal environment with just one instance of the portlet.
Remarque Before uPortal 2.5.4, because of a bug (http://www.ja-sig.org/issues/browse/UP-1040) you can't use this feature.
- name (displayed on interface)
- description (displayed on interface)
- refCategoryProfile references on category profile declared in this context (using category profile id)You can declare as many category profiles as you want in a context. Each category profile must be defined in an element categoryProfile. A same categoryProfile can be declared in many contexts.
- 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> |
...
- urlCategory : url to get back a xml category file on a remote server 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"
...

