CardDAV Server
Working with the Quickstart
The Quickstart uses Bedework's directory server (buildt on Apache DS) to serve public contacts -- both people and locations. Private address books are stored in an HSQLDB database. HSQLDB is the java-based database engine included in the quickstart. Instructions for adding more public information are included below.
Three locations and three public people are preloaded into the quickstart and served out by Apache DS. That data resides in <qs>/apacheds-1.5.3-fixed/bedework.org. Three of the preloaded Bedework users -- vbede, bfranklin, and mtwain -- have contacts stored in their address books.
Getting Bedework ready:
- Kill bedework, if you've been running it.
- cd <qs>
- svn update bedework
- svn update bedework-carddav
make a copy of your apacheds directory in case your directory gets hosed later:
cp -rp apacheds-1.5.3-fixed apacheds-1.5.3-fixed.REFERENCE (or whatever)
- review carddav settings in cal.options.xml
- For example, <cardPathPrefixes>/public/people,loc_:/public/locations</cardPathPrefixes>. See note on "loc_" in the * Public Locations* section.
build bedework:
./bw -quickstart deploy
build carddav:
./bw -quickstart -carddav
#(if needed) delete your carddav database to make sure that you're starting clean. (Bedework will recreate it when it starts):
- cd <qs>/jboss-5.1.0.GA/server/default/data/hypersonic
- delete or move to the side CardDb3p7*
- In one window, start apache directory services
- cd <qs>
- /bw -quickstart dirstart
- In other window, start bedework
- cd <qs>
./startjboss
- (if you deleted you database) Import the schema:
- visit localhost:8080/jmx-console
- Log in with username "admin" and password "bw" (if the login doesn't work, check the file <qs>/jboss-5.1.0.GA/default/server/conf/props/jmx-console-users.properties).
- scroll all the way down and choose service=CardDumpres very near the bottom
- set export to True
- set create to True
- (temporarily, pending fix) remove "carddumprestore" path component from SchemaOutFile
- Apply Changes#* Move toward the bottom and clink on the Schema Invoke button.
- Check the jboss window for "schema export complete".
Public Locations
We follow a convention of prefixing location calendar addresses with “loc_” to distinguish them from people. For example, here's the vcard for "Cafe de la Butte", one of the locations shipped with Bedework (http://localhost:8080/ucarddav/public/locations/CafeDeLaButte.vcf). Note the EMAIL attribute:
BEGIN:VCARD VERSION:4.0 REV:20101012T010409Z SOURCE:/ucarddav/public/locations//CafeDeLaButte.vcf UID:/ucarddav/public/locations//CafeDeLaButte.vcf KIND:location NOTE:Cafe De La Butte\, 71 Rue Caulaincourt\, Paris\, France EMAIL:loc_cafedelabutte@mysite.edu CALADRURI:mailto:loc_cafedelabutte@mysite.edu FN:CafeDeLaButte END:VCARD
That email prefix can be changed in cal.options.xml inside the configuration directory.
Adding Public Locations
Because public locations are served by the built-in LDAP server, prepare them for import by preparing an LDIF file (let's say locations.ldif), with entries that look like this:
dn: cn=CafeDeLaButte,ou=locations,ou=public,dc=bedework,dc=org objectclass: top objectclass: calendarresource objectclass: schedapprovalinfo objectclass: calEntry objectclass: room kind: location uid: bw000001@mysite.edu calCalAdrURI: mailto:loc_cafedelabutte@mysite.edu mail: loc_cafedelabutte@mysite.edu cn: CafeDeLaButte ou: locations description: Cafe De La Butte autoschedule: TRUE
- (Download, Install and) Start up Apache Directory Studio and point it at the Bedework Directory Server
- Add ldap connection
- server: localhost:10389
- user dn: uid=admin,ou=system password="secret"
- Add ldap connection
- Locate ou=locations under ou=public, under dc=bedework, dc=org## Import locations.ldif by right-clicking on ou=locations and choosing import/ldif import and browsing to its location. If there's a chance of duplicates, click Update existing entries.
- Test with http://localhost:8080/ucarddav/public/locations.
Adding Public People
Like with locations. public people need to be imported via an LDIF. So, if you're starting with a VCARD, this entry
BEGIN:VCARD VERSION:4.0 EMAIL:tedison@mysite.edu N:Thomas Alva Edison CALADRURI:mailto:tedison@mysite.edu FN:TEdison WORK.TEL;TYPE=voice:222-222-2222 NICKNAME:Sparky END:VCARD
needs to be turned into this entry:
dn: cn=TEdison,ou=people,ou=public,dc=bedework,dc=org objectClass: organizationalPerson objectClass: person objectClass: inetOrgPerson objectClass: calEntry objectClass: top cn: TEdison sn: Thomas Alva Edison calCalAdrURI: [mailto:tedison@mysite.edu] displayName: Sparky mail: tedison@mysite.edu ou: people telephoneNumber: 222-222-2222 uid: bwpp00002@mysite.edu
Then:
- (if it's not running) Start up Apache Directory Studio
- Locate ou=people under ou=public, under dc=bedework, dc=org
- Import locations.ldif by right-clicking on ou=locations and choosing import/ldif import and browsing to its location. If there's a chance of duplicates, click Update existing entries.
- Test with http://localhost:8080/ucarddav/public/people
Importing vcard data into Bedework using the Bedework Address Book web client (for a single user’s address book)
The Bedework address book client allows personal calendar users to import vcard data directly into their personal address books.
- Log into the Bedework personal calendar.
- Select “Contacts” in the left menu to open the Bedework address book client.
- In the address book client menus, select Tools → Import
- In a text editor, open the vcard file you wish to import.
- Copy the text of the vcard data and paste it into the text box in the Bedework address book client.
- Click “Import”.