jwma Development - JwmaContactsController Specification
 
Main | Deployment | Configuration | Architecture | Development | Screenshots | SF Project Site
Index | Overview | Building | API Docs | Credits & Contributors

General Remarks


This document represents a specification of the JwmaContactsController, which is a servlet based implementation of jwma's abstract contacts controller. It describes the controller targets and tasks in detail.
Related information can be found in the HtmlHelper API documentation, as well as the contacts documentation.

Controller Targets

acton=<target> Description
database Actions will be related to the database.
group Actions will be related to groups.
contact Actions will be related to contacts.

The following sections will specify all valid tasks for each of these targets.

database


display 
Description Redirects to the contacts view.
Parameters  
Redirects To Contacts view
Method doDisplayDatabase()
URL example <URI prefix>?acton=database&todo=display

store
Description Stores the database and redirects to the contacts view.
Parameters  
Redirects To Contacts view
Method doStoreDatabase()
URL example <URI prefix>?acton=database&todo=store

export
Description not used (preparation for an export feature) 
Parameters N.A.
Redirects To  
Method N.A.
URL example N.A.

setfilter
Description Sets a display filter for the contacts stored in the user's database and returns to the last view.
Parameters filtertype: String ("alphabetic" | "category")
filter: String ("none" | "a"-"z" | "<category name>")
Redirects To Last view
Method doSetContactsFilter()

URL examples

<URI prefix>?acton=database&todo=setfilter&filtertype=alphabetic&filter=w
<URI prefix>?acton=database&todo=setfilter&filtertype=category&filter=Personal

HtmlHelper getAlphabeticFilter()
getCategoryFilterSelect()

group


display
Description Prepares the given contact group reference and redirects to the group view.
Parameters group.id: String (usually obtained from group.getUID())
Redirects To Group view
Method doDisplayGroup()
URL example <URI prefix>?acton=group&todo=display&group.id=23fe388ac94443

edit
Description Prepares the given contact group reference and redirects to the group edit view.
Parameters group.id: String (usually obtained from group.getUID())
Redirects To Group Edit view
Method doEditGroup()
URL example <URI prefix>?acton=group&todo=edit&group.id=23fe388ac94443

update
Description Tries to update the name and comment of a given contact group and redirects to the group edit view.
Parameters

group.id: String (usually obtained from group.getUID())
group.name: String
group.comment: String

Redirects To Group Edit view
Method doUpdateGroup()
URL example <URI prefix>?acton=group&todo=update&group.id=23fe388ac94443&group.name=test&group.comment=Testing

create
Description Tries to create a new group with the given name and comment, and redirects to the group edit view.
Parameters group.name: String
group.comment: String
Redirects To Group Edit view
Method doCreateGroup()
URL example <URI prefix>?acton=group&todo=create&group.name=test&group.comment=testing

delete
Description Tries to delete the given contact groups, and redirects to the contacts view.
Parameters group.id: String group identifiers (usually obtained from group.getUID())
Redirects To Contacts view
Method doDeleteGroups()
URL example <URI prefix>?acton=group&todo=delete&group.id=23fe388ac94443

addcontacts
Description Tries to add the given contacts to the given group and redirects to the group edit view.
Parameters group.id: String group identifier (usually obtained from group.getUID())
contact.nomember.id: String contact identifiers (usually obtained from contact.getUID())
Redirects To Group Edit view
Method doAddContacts()
URL example <URI prefix>?acton=group&todo=addcontacts&contact.nomember.id=23fe388ac94443

removecontacts
Description Tries to remove the given contacts from the given group and redirects to the group edit view.
Parameters group.id: String group identifier (usually obtained from group.getUID())
contact.member.id: String contact identifiers (usually obtained from contact.getUID())
Redirects To Group Edit view
Method doRemoveContacts()
URL example <URI prefix>?acton=group&todo=removecontacts&contact.nomember.id=23fe388ac94443


contact


display
Description Prepares a given contact reference and redirects to the contact view.
Parameters contact.id: String (should be obtained from contact.getUID())
Redirects To Contact view
Method doDisplayContact()
URL examples <URI prefix>?acton=contact&todo=display&contact.id=23fe388ac94443f

edit
Description Prepares a given contact reference and redirects to the contact edit view.
Parameters contact.id: String (should be obtained from contact.getUID())
Redirects To Contact Edit view
Method doEditContact()
URL examples <URI prefix>?acton=contact&todo=edit&contact.id=23fe388ac94443f

update
Description Tries to update a given contact and redirects to the contact edit view.
Parameters contact.id: String (should be obtained from contact.getUID())
category: String (obtained from HtmlHelper)
_category: String (to give a new category)
firstname: String
lastname: String
middlename: String
nickname: String
company: String
title: String
role: String
phone.home: String
phone.work: String
phone.pager: String
phone.fax: String
phone.mobile : String
primary.location: boolean (as String "true"/"false")
work.street: String
work.city: String
work.region: String
work.country: String
work.zip: String
home.street: String
home.city: String
home.region: String
home.country: String
home.zip: String
email.primary: String
email.alternate: String
personal.url: String
company.url: String
birthdate: Date (as String; according to pattern setting in prefs)
comments: String
frequent: boolean (as String "true"/"false")
Redirects To Contact Edit view
Method doUpdateContact()
URL examples <URI prefix>?acton=contact&todo=update&contact.id=23fe388ac94443f&category=Personal&..
HtmlHelper getCategoriesSelect()

create
Description Tries to create a new contact with data and redirects to the contact edit view.
Parameters category: String (obtained from HtmlHelper)
_category: String (to give a new category)
firstname: String
lastname: String
middlename: String
nickname: String
company: String
title: String
role: String
phone.home: String
phone.work: String
phone.pager: String
phone.fax: String
phone.mobile : String
primary.location: boolean (as String "true"/"false")
work.street: String
work.city: String
work.region: String
work.country: String
work.zip: String
home.street: String
home.city: String
home.region: String
home.country: String
home.zip: String
email.primary: String
email.alternate: String
personal.url: String
company.url: String
birthdate: Date (as String; according to pattern setting in prefs)
comments: String
frequent: boolean (as String "true"/"false")
Redirects To Contact Edit view
Method doUpdateContact()
URL examples <URI prefix>?acton=contact&todo=createe&firstname=Some&lastname=Body&..
HtmlHelper getCategoriesSelect()

delete
Description Tries to deletes the given contacts and redirects to the contacts view.
Parameters contact.id: String (repeatedly; should be obtained from contact.getUID();)
Redirects To Contacts view
Method doDeleteContacts()
URL examples <URI prefix>?acton=contact&todo=edit&contact.id=23fe388ac94443f

import
Description not used (preparation for an import feature) 
Parameters N.A.
Redirects To N.A.
Method N.A.
URL example N.A.

© 2000-2003 jwma team