|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jalios.rest.client.DataElement
com.jalios.rest.client.MemberElement
public class MemberElement
This class provides a wrapper to get the informations in the JCMS data XML element of a Member resource.
ClientSession clientSession = new ClientSession("http://www.example.com/"); JcmsApp jcmsApp = new JcmsApp(clientSession); JcmsResource memberResource = jcmsApp.getData("j_2"); DataElement memberDataElement = MemberElement.getFirstDataElement(memberResource, clientSession); String login = memberDataElement.getLogin(); String firstname = memberDataElement.getFirstName(); String lastname = memberDataElement.getName(); String email = memberDataElement.getEmail(); System.out.printf("Hello {0} {1}! Your login is '{2}' and your email is '{3}'.", firstname, lastname, login, email);
Field Summary | |
---|---|
protected java.lang.String |
address
|
protected java.lang.String |
email
|
protected java.lang.String |
firstName
|
protected java.lang.String |
info
|
protected boolean |
isAdmin
|
protected boolean |
isAdminRead
|
protected boolean |
isEmailVisible
|
protected boolean |
isEmailVisibleRead
|
protected java.lang.String |
jobTitle
|
protected java.lang.String |
language
|
protected java.lang.String |
login
|
protected java.lang.String |
mobile
|
protected java.lang.String |
name
|
protected java.lang.String |
organization
|
protected java.lang.String |
phone
|
protected java.lang.String |
salutation
|
protected int |
usage
|
Constructor Summary | |
---|---|
MemberElement(org.jdom.Element element,
ClientSession session)
Builds a new MemberElement from the specified xml Element and session Use the simpler method getFirstMemberElement(JcmsResource, ClientSession)
instead of invoking this constructor. |
Method Summary | |
---|---|
java.lang.String |
getAddress()
Retrieve the postal address of this Member. |
java.lang.String |
getEmail()
Retrieve the email address of this Member. |
static MemberElement |
getFirstMemberElement(JcmsResource resource,
ClientSession session)
Retrieve the MemberElement corresponding to the single data in the specified resource. |
java.lang.String |
getFirstName()
Retrieve the first name of this Member. |
java.lang.String |
getInfo()
Retrieve the information on this Member. |
java.lang.String |
getJobTitle()
Retrieve the Job Title of this Member. |
java.lang.String |
getLanguage()
Retrieve the language on this Member. |
java.lang.String |
getLogin()
Retrieve the login of this Member. |
java.lang.String |
getMobile()
Retrieve the mobile phone number of this Member. |
java.lang.String |
getName()
Retrieve the last name of this Member. |
java.lang.String |
getOrganization()
Retrieve the organization of this Member. |
java.lang.String |
getPhone()
Retrieve the phone number of this Member. |
java.lang.String |
getSalutation()
Retrieve the salutation of this Member. |
int |
getUsage()
Retrieve the usage of this Member (0 is an account, 1 is a contact). |
boolean |
isAdmin()
Check if this Member is an admin. |
boolean |
isEmailVisible()
Retrieve the email address visibility status of this Member. |
Methods inherited from class com.jalios.rest.client.DataElement |
---|
getAbstractField, getAbstractMLName, getCdate, getDataElementList, getDataElementList, getDataType, getElement, getField, getFieldText, getFirstDataElement, getId, getMainLanguage, getMdate, getMLField, getPdate, getRelateds, getTitle, getUrl |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.String login
protected java.lang.String name
protected java.lang.String firstName
protected java.lang.String email
protected boolean isEmailVisible
protected boolean isEmailVisibleRead
protected java.lang.String salutation
protected java.lang.String organization
protected java.lang.String jobTitle
protected java.lang.String phone
protected java.lang.String mobile
protected java.lang.String address
protected java.lang.String info
protected int usage
protected java.lang.String language
protected boolean isAdmin
protected boolean isAdminRead
Constructor Detail |
---|
public MemberElement(org.jdom.Element element, ClientSession session)
Use the simpler method getFirstMemberElement(JcmsResource, ClientSession)
instead of invoking this constructor.
element
- the xml Element corresponding to the Member (data)session
- the ClientSession in which element was retrievedMethod Detail |
---|
public java.lang.String getLogin()
public java.lang.String getName()
public java.lang.String getFirstName()
public java.lang.String getEmail()
public boolean isEmailVisible()
public java.lang.String getSalutation()
public java.lang.String getOrganization()
public java.lang.String getJobTitle()
public java.lang.String getPhone()
public java.lang.String getMobile()
public java.lang.String getAddress()
public java.lang.String getInfo()
public int getUsage()
public java.lang.String getLanguage()
public boolean isAdmin()
public static MemberElement getFirstMemberElement(JcmsResource resource, ClientSession session)
JcmsResource memberResource = jcmsApp.getData("j_2"); DataElement memberDataElement = MemberElement.getFirstDataElement(memberResource, clientSession);
resource
- session
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |