r2 - 02 Jul 2007 - 11:32:31 - BrianMoseleyYou are here: OSAF >  Projects Web  >  CosmoHome > CosmoDevelopmentHome > CosmoUserServiceDocument

Cosmo User Service Documents

In order to isolate clients from future changes to the Cosmo URI scheme, and to provide an entry point for any client to programmatically find all the relevant information it needs about how to access a user's data via any of the protocols and interfaces Cosmo supports, Cosmo 0.6 provides a user service document (or USD), an XML document listing every URI that can be used to access a user's data.

Service document location

The USD is accessed via CMP at /cmp/user/{username}/service.

User URIs

These are the URIs of actual resources available via various protocols.

The definition title is the value used in the title attribute of the link element in the USD.

cmp
The user's account via CMP; /cmp/user/{username}
mc
The listing of a user's collections via Morse Code; /mc/user/{username}
atom
The user's Atom service document; /atom/user/{username}
dav
The user's home collection via WebDAV; /dav/home/{username}
davPrincipal
The user's WebDAV principal resource; /dav/home/{username}
davCalendarHome
The user's home collection for CalDAV calendar collections; /dav/home/{username}

Base URLs

These are the base URLs for protocols that can be used by clients to construct collection and user URLs for other protocols. For example, the Morse Code base URL can be used to construct the URL to which a client can publish a new collection. These base URLs do not represent actual resources, and requests to them will return error responses.

The definition title is the value used in the title attribute of the base element in the USD.

atom
The base URI for Atom; http://{host}:{port}/cosmo/atom
mc
The base URI for Morse Code; http://{host}:{port}/cosmo/atom
pim
The base URI for the Web PIM; http://{host}:{port}/cosmo/atom
webcal
The base URI for webcal protocol access; http://{host}:{port}/cosmo/atom

The WebDAV protocol handler does not yet support collection URIs and therefore is not represented by base elements in the USD.

XML Schema

The RELAX NG schema is found at http://svn.osafoundation.org/server/cosmo/trunk/src/main/resources/cmp-userService.rnc.

service
the outermost element
username
the username of the user whose URIs are enclosed in this document
link
represents a user URI, with these mandatory attributes:
title
a name identifying the protocol used to access this URI
type
the media type of the resource at this URI
href
the URI itself
base
represents a base URI, with the same mandatory attributes as link

Examples

<?xml version="1.0" encoding='utf-8'?>
<service xmlns="http://osafoundation.org/cosmo/CMP/userService">
  <username>bcm</username>
  <link title="cmp" type="text/xml" href="http://osaf.us/cosmo/cmp/user/bcm"/>
  <link title="mc" type="text/xml" href="http://osaf.us/cosmo/mc/user/bcm"/>
  <link title="atom" type="application/atomsvc+xml" href="http://osaf.us/cosmo/atom/user/bcm"/>
  <link title="dav" type="text/xml" href="http://osaf.us/cosmo/dav/bcm"/>
  <link title="davPrincipal" type="text/xml" href="http://osaf.us/cosmo/dav/bcm"/>
  <link title="davCalendarHome" type="text/xml" href="http://osaf.us/cosmo/dav/bcm"/>
  <base title="atom" type="application/atom+xml" href="http://osaf.us/cosmo/atom"/>
  <base title="mc" type="application/eim+xml" href="http://osaf.us/cosmo/mc"/>
  <base title="pim" type="text/html" href="http://osaf.us/cosmo/pim"/>
  <base title="webcal" type="text/calendar" href="http://osaf.us/cosmo/webcal"/>
</service>

Security concerns

The USD is protected with Basic authentication. A regular user may access only his own USD. An administrator may access all users' USDs.

Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r2 < r1 | More topic actions
 
Open Source Applications Foundation
Except where otherwise noted, this site and its content are licensed by OSAF under an Creative Commons License, Attribution Only 3.0.
See list of page contributors for attributions.