Skip to Content.
Sympa Menu

grouper-users - Pt. 2: Playing with a new group type

Subject: Grouper Users - Open Discussion List

List archive

Pt. 2: Playing with a new group type


Chronological Thread 
  • From: Keith Hazelton <>
  • To:
  • Subject: Pt. 2: Playing with a new group type
  • Date: Wed, 29 Dec 2004 21:28:12 -0600

Some additional info on the new group type "service" mentioned in the previous message.

To get the new group type bootstrapped into the grouper system, I ran some hibernate db commands modeled on the ones used during the Grouper installation process to initialize the system tables.

Here is the ../sql/initPase.sql file with insert statements to create a "service" group type and the additional member fields necessary to support it (elig-affils, includes, and excludes).

-----

--
-- $Id: initPase.sql,v 0.2 2004/12/23 21:58 hazelton Exp $
--

-- Service Grouper group type
INSERT INTO grouper_type (groupType) VALUES ('service');

INSERT INTO grouper_field (groupField, readPriv, writePriv, isList)
VALUES ('elig-affils', 'UPDATE', 'UPDATE', 'TRUE');
INSERT INTO grouper_field (groupField, readPriv, writePriv, isList)
VALUES ('includes', 'UPDATE', 'UPDATE', 'TRUE');
INSERT INTO grouper_field (groupField, readPriv, writePriv, isList)
VALUES ('excludes', 'UPDATE', 'UPDATE', 'TRUE');

INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'extension');
INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'stem');
INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'name');
INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'description');
INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'displayExtension');
INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'displayName');
INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'members');
INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'viewers');
INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'readers');
INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'updaters');
INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'admins');
INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'optins');
INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'optouts');

INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'elig-affils');
INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'includes');
INSERT INTO grouper_typeDef (groupType, groupField)
VALUES ('service', 'excludes');

-----

I added a new target to the build.xml file to run this initPase.sql file through hibernate.

-----
...
<target name="db-init-pase"
description="Initialize service group type and other PASE definition data">
<java classname="org.hsqldb.util.DatabaseManager" fork="yes">
<classpath refid="project.class.path"/>
<arg value="-driver"/>
<arg value="${jdbc.driver}"/>
<arg value="-url"/>
<arg value="${jdbc.url}"/>
<arg value="-user"/>
<arg value="sa"/>
<arg value="-script"/>
<arg value="sql/initPase.sql"/>
</java>
</target>
...

-----

________________________________________________________
Keith Hazelton Senior IT Architect, UW-Madison
(608) 262-0771 Division of Info. Technology
(608) 877-0977 (home) 1210 W. Dayton St., rm. 2164
http://arch.doit.wisc.edu/keith Madison, WI 53706




  • Pt. 2: Playing with a new group type, Keith Hazelton, 12/29/2004

Archive powered by MHonArc 2.6.16.

Top of Page