Groupe 1A (socle)

Creation Date: 26 novembre 2004
Last update : 08 fevrier 2005
Mdoe : internet

Utility to load group

This document describes how to use the utility of loading of group developed by Esup-Portail.


This utility is included in the packages esup, (to consult the CHANGELOG of the package in order to know if it is available in your version)

Principle

The purpose of this utility is to act on the groups of uPortal via ant. It has the following methods:

Use

This utility is based on a file XML making it possible to define the actions has to carry out.

By defect, the file used is properties/groups/GroupLoad.xml

It supports the parameter dataFile, which makes it possible to use another file of configuration.

Example :

ant esup.groups.load -DdataFile=/properties/groups/esupGroupLoad.xml

You also have two files examples:

Configuration file :

Example :

<?xml version="1.0" encoding="UTF-8"?>
<Group-Loading failonerror="false" duplicategroup="false">
	<!-- BE CAREFUL BEFORE RUN SWITCH JNDI TO OFF in portal.properties and    PersonDirs.xml -->
   
  	<groupAdd name="Groupe test" description="Groupe test"/>
<groupAdd name="Groupe test duplique" description="Groupe test duplique" duplicate="true"/> <groupAdd name="Groupe de canaux" description="Groupe test de canaux" type="channel"/> <groupDel key="local.104"/>
<groupDel name="uPortal"/>
<groupRename name="Outils" newName="Outils renome"/>
<groupRename key="local.105" newName="Informatiques"/>
<groupRename name="Outils renome" newDesc="Une autre description"/>
<attachAdd name="Groupe test" parentName="Information"/>
<attachAdd key="pags.campus" parentName="Etudiants"/> <attachAdd name="Outils renome" parentKey="local.120"/> <attachDel name="Groupe test" parentName="Information"/>
<attachDel key="pags.campus" parentName="Etudiants"/>
<attachDel name="Outils renome" parentKey="local.120"/>
<memberAdd uid="admin" parentName="Groupe test"/>
<memberAdd uid="admin" parentKey="Groupe test"/>
<memberDel uid="admin" parentName="Groupe test"/>
<memberDel uid="admin" parentKey="Groupe test"/> </Group-Loading>

This file is an example, to in no case this file will not go.

The file is treated from top to bottom.

The groups can be described by their name or their key.

failonerror

This flag enables you to specify the behavior of the utility:

duplicategroup

This flag permit to say if you authorize creation of group with the same name :

Addition of a group (groupAdd)

Attributes :

Suppression of group (groupDel)

Attributes :

Rename a group (groupRename)

Attributes :

You must specify the newName or the newDesc (or both).

To attach a group in another (attachAdd)

Attributes :

CAUTION: the child group must be in the same type than the group relative (person < = > person or channel < = > channel)

CAUTION : this utility forbidden attach a group if an other group with the same name exist in the parent.

To remove the attachment of a group in another (attachDel)

like attachAdd

To add a member (person) in a group (memberAdd)

Attributes :

CAUTION: for the moment this method can only attach people (not channels)

To remove a member (person) of a group (memberDel)

like memberAdd