|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This interface is used for Domino specific contacts. There are several mappings of groupware keys to Domino concepts which are worth noting:
An example of creating a Domino contact follows
Sample code:
/** * The <code>createContact</code> method demonstrates how to create a * contact with the Domino provider. * * @throws CollaborationException if the session factory could not instantiate * a session with the given parameters, or if there was an error * retrieving folders, setting properties, or sending a message. */ public void createContact ( ) throws CollaborationException { HashMap props = new HashMap (); props.put (ISession.PROP_PROVIDER, IDominoSession.INTERNAL_NAME); props.put (IDominoSession.PROP_SERVICE_URL, "server"); props.put (IDominoSession.PROP_USER_USERNAME, "username"); props.put (IDominoSession.PROP_USER_PASSWORD, "password"); IDominoSession session = (IDominoSession) SessionFactory.createSession ( props); session.login (); // get default container IDominoContactsContainer contacts = (IDominoContactsContainer) session.getDefaultContainer (DefaultContainerClassEnum.CONTACTS); IItem item = contacts.add (); IDominoContact contact = (IDominoContact) item; // IPerson contact.setAssistant ("Assistant"); contact.setJobTitle ("Title"); contact.setCompanyName ("Company"); contact.setDepartmentName ("Department"); contact.setOfficeLocation ("Office Location"); contact.setManagerName ("Manager Name"); contact.setBusinessAddress (new PostalAddress ("Business Street", "Business City", "Business State", "Business Country", "Business Postal Code")); contact.setPersonalAddress (new PostalAddress ("Personal Street", "Personal City", "Personal State", "Personal Country", "Personal Postal Code")); contact.setBusinessPhone (new PhoneNumber ("Business Phone")); contact.setBusinessFax (new PhoneNumber ("Business Fax")); contact.setHomePhone (new PhoneNumber ("Home Phone")); contact.setHomeFax (new PhoneNumber ("Home Fax")); contact.setBusinessPager (new PhoneNumber ("Business Pager")); contact.setPersonalMobilePhone (new PhoneNumber ("Mobile Phone")); contact.setWebPage ("Web Page"); contact.setSmtpAddress ("first.last@compoze.com"); contact.setName ("Prefix", "First", "Middle", "Last", "Suffix"); // IContact contact.setBirthday (new Date()); contact.setChildren (new String[] { "Child1", "Child2" }); contact.setSpouse ("Spouse"); // IDominoContact contact.setPhoneticName ("Phonetic Name"); contact.setPhoneLabel1 ("Phone Label 1"); contact.setPhoneLabel2 ("Phone Label 2"); contact.setPhoneLabel3 ("Phone Label 3"); contact.setPhoneLabel4 ("Phone Label 4"); contact.setPhoneLabel5 ("Phone Label 5"); contact.setPhoneLabel6 ("Phone Label 6"); contact.setComment ("Comment"); contact.setShortName ("short_name"); contact.setFullName ("Full Name"); contact.commit (); contact.addAttachment (new FileAttachmentSource ("c:\\file.txt")); session.close (); }
Field Summary | |
static ItemClass |
CLASS
The item class of IDominoContact . |
static Key |
COMMENT
Key that represents the comment. |
static int |
KEYID_COMMENT
The int ID for the COMMENT key. |
static int |
KEYID_PHONE_LABEL_1
The int ID for the PHONE_LABEL_1 key. |
static int |
KEYID_PHONE_LABEL_2
The int ID for the PHONE_LABEL_2 key. |
static int |
KEYID_PHONE_LABEL_3
The int ID for the PHONE_LABEL_3 key. |
static int |
KEYID_PHONE_LABEL_4
The int ID for the PHONE_LABEL_4 key. |
static int |
KEYID_PHONE_LABEL_5
The int ID for the PHONE_LABEL_5 key. |
static int |
KEYID_PHONE_LABEL_6
The int ID for the PHONE_LABEL_6 key. |
static int |
KEYID_PHONETIC_NAME
The int ID for the PHONETIC_NAME key. |
static int |
KEYID_SHORT_NAME
The int ID for the SHORT_NAME key. |
static Key |
PHONE_LABEL_1
Key that represents the phone label 1. |
static Key |
PHONE_LABEL_2
Key that represents the phone label 2. |
static Key |
PHONE_LABEL_3
Key that represents the phone label 3. |
static Key |
PHONE_LABEL_4
Key that represents the phone label 4. |
static Key |
PHONE_LABEL_5
Key that represents the phone label 5. |
static Key |
PHONE_LABEL_6
Key that represents the phone label 6. |
static Key |
PHONETIC_NAME
Key that represents the phonetic name. |
static Key |
SHORT_NAME
Key that represents the short name. |
Fields inherited from interface com.compoze.collab.groupware.IContact |
BIRTHDAY, CHILDREN, KEYID_BIRTHDAY, KEYID_CHILDREN, KEYID_SPOUSE_NAME, SPOUSE_NAME |
Fields inherited from interface com.compoze.collab.groupware.IGroupwareItem |
CATEGORIES, DATE_CREATED, DATE_LAST_MODIFIED, IMPORTANCE, KEYID_CATEGORIES, KEYID_DATE_CREATED, KEYID_DATE_LAST_MODIFIED, KEYID_IMPORTANCE, KEYID_SIZE, KEYID_SUBJECT, SIZE, SUBJECT |
Fields inherited from interface com.compoze.collab.messaging.IMessagingItem |
BODY, BODY_HTML, KEYID_BODY, KEYID_BODY_HTML |
Fields inherited from interface com.compoze.collab.IItem |
ID, ITEM_CLASS, KEYID_ID, KEYID_ITEM_CLASS, KEYID_PARENT_ID, MINIMUM_ITEM_KEYS, PARENT_ID |
Fields inherited from interface com.compoze.collab.domino.IDominoPerson |
FULL_NAME, KEYID_FULL_NAME |
Fields inherited from interface com.compoze.collab.IAttachmentSupport |
ATTACHMENTS, HAS_ATTACHMENT, KEYID_ATTACHMENTS, KEYID_HAS_ATTACHMENT |
Method Summary | |
java.lang.String |
getComment()
Gets the comment of the contact. |
java.lang.String |
getPhoneLabel1()
Gets the phone label 1 for the contact. |
java.lang.String |
getPhoneLabel2()
Gets the phone label 2 for the contact. |
java.lang.String |
getPhoneLabel3()
Gets the phone label 3 for the contact. |
java.lang.String |
getPhoneLabel4()
Gets the phone label 4 for the contact. |
java.lang.String |
getPhoneLabel5()
Gets the phone label 5 for the contact. |
java.lang.String |
getPhoneLabel6()
Gets the phone label 6 for the contact. |
java.lang.String |
getPhoneticName()
Gets the phonetic name of the contact. |
java.lang.String |
getShortName()
Gets the short name of the contact. |
void |
setComment(java.lang.String sComment)
Sets the comment of the contact. |
void |
setFullName(java.lang.String sFullName)
Sets the full name of the contact. |
void |
setPhoneLabel1(java.lang.String sPhoneLabel1)
Sets the phone label 1 for the contact. |
void |
setPhoneLabel2(java.lang.String sPhoneLabel2)
Sets the phone label 2 for the contact. |
void |
setPhoneLabel3(java.lang.String sPhoneLabel3)
Sets the phone label 3 for the contact. |
void |
setPhoneLabel4(java.lang.String sPhoneLabel4)
Sets the phone label 4 for the contact. |
void |
setPhoneLabel5(java.lang.String sPhoneLabel5)
Sets the phone label 5 for the contact. |
void |
setPhoneLabel6(java.lang.String sPhoneLabel6)
Sets the phone label 6 for the contact. |
void |
setPhoneticName(java.lang.String sName)
Sets the phonetic name of the contact. |
void |
setShortName(java.lang.String sShortName)
Sets the short name of the contact. |
Methods inherited from interface com.compoze.collab.groupware.IContact |
getBirthday, getChildren, getSpouse, setBirthday, setChildren, setSpouse |
Methods inherited from interface com.compoze.collab.groupware.IGroupwareItem |
getBodyHtml, getBodyHtml, getCategories, getDateCreated, getDateLastModified, getImportance, getNormalizedSubject, getSize, getSubject, getSubject, getSubjectPrefix, setBodyHtml, setCategories, setImportance, setSubject |
Methods inherited from interface com.compoze.collab.messaging.IMessagingItem |
getBody, setBody |
Methods inherited from interface com.compoze.collab.IItem |
commit, containsKey, containsKey, copyProperties, copyTo, delete, fetchProperties, getAttribute, getEnum, getID, getInputStream, getItemClass, getOutputStream, getParent, getParent, getParentID, getProperties, getProperties, getProperties, getProperty, getProperty, getProperty, getReader, getRootContainer, getSession, getWriter, isMissing, moveTo, removeAttribute, removeProperty, setAttribute, setProperties, setProperty, setProperty, setProperty |
Methods inherited from interface com.compoze.collab.domino.IDominoPerson |
getFullName |
Methods inherited from interface com.compoze.collab.IAttachmentSupport |
addAttachment, getAttachment, getAttachmentCount, getAttachments, hasAttachment |
Field Detail |
public static final int KEYID_PHONETIC_NAME
int
ID for the PHONETIC_NAME
key.public static final int KEYID_PHONE_LABEL_1
int
ID for the PHONE_LABEL_1
key.public static final int KEYID_PHONE_LABEL_2
int
ID for the PHONE_LABEL_2
key.public static final int KEYID_PHONE_LABEL_3
int
ID for the PHONE_LABEL_3
key.public static final int KEYID_PHONE_LABEL_4
int
ID for the PHONE_LABEL_4
key.public static final int KEYID_PHONE_LABEL_5
int
ID for the PHONE_LABEL_5
key.public static final int KEYID_PHONE_LABEL_6
int
ID for the PHONE_LABEL_6
key.public static final int KEYID_COMMENT
int
ID for the COMMENT
key.public static final int KEYID_SHORT_NAME
int
ID for the SHORT_NAME
key.public static final Key PHONETIC_NAME
public static final Key PHONE_LABEL_1
public static final Key PHONE_LABEL_2
public static final Key PHONE_LABEL_3
public static final Key PHONE_LABEL_4
public static final Key PHONE_LABEL_5
public static final Key PHONE_LABEL_6
public static final Key COMMENT
public static final Key SHORT_NAME
public static final ItemClass CLASS
IDominoContact
.Method Detail |
public java.lang.String getPhoneticName() throws CollaborationException
null
)PHONETIC_NAME
public void setPhoneticName(java.lang.String sName) throws CollaborationException
sName
- the phonetic name (not null
)PHONETIC_NAME
public java.lang.String getPhoneLabel1() throws CollaborationException
null
)PHONE_LABEL_1
public void setPhoneLabel1(java.lang.String sPhoneLabel1) throws CollaborationException
sPhoneLabel1
- the phone label 1 for the contact (not null
)PHONE_LABEL_1
public java.lang.String getPhoneLabel2() throws CollaborationException
null
)PHONE_LABEL_2
public void setPhoneLabel2(java.lang.String sPhoneLabel2) throws CollaborationException
sPhoneLabel2
- the phone label 2 for the contact (not null
)PHONE_LABEL_2
public java.lang.String getPhoneLabel3() throws CollaborationException
null
)PHONE_LABEL_3
public void setPhoneLabel3(java.lang.String sPhoneLabel3) throws CollaborationException
sPhoneLabel3
- the phone label 3 for the contact (not null
)PHONE_LABEL_3
public java.lang.String getPhoneLabel4() throws CollaborationException
null
)PHONE_LABEL_4
public void setPhoneLabel4(java.lang.String sPhoneLabel4) throws CollaborationException
sPhoneLabel4
- the phone label 4 for the contact (not null
)PHONE_LABEL_4
public java.lang.String getPhoneLabel5() throws CollaborationException
null
)PHONE_LABEL_5
public void setPhoneLabel5(java.lang.String sPhoneLabel5) throws CollaborationException
sPhoneLabel5
- the phone label 5 for the contact (not null
)PHONE_LABEL_5
public java.lang.String getPhoneLabel6() throws CollaborationException
null
)PHONE_LABEL_6
public void setPhoneLabel6(java.lang.String sPhoneLabel6) throws CollaborationException
sPhoneLabel6
- the phone label 6 for the contact (not null
)PHONE_LABEL_6
public java.lang.String getComment() throws CollaborationException
null
)COMMENT
public void setComment(java.lang.String sComment) throws CollaborationException
sComment
- the comment of the contact (not null
)COMMENT
public java.lang.String getShortName() throws CollaborationException
null
)SHORT_NAME
public void setShortName(java.lang.String sShortName) throws CollaborationException
sShortName
- the short name of the contact (not null
)SHORT_NAME
public void setFullName(java.lang.String sFullName) throws CollaborationException
sFullName
- the full name of the contact (not null
)IDominoPerson.FULL_NAME
|
BEA Systems, Inc. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |