|
||||||||||
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 String |
address
|
protected String |
email
|
protected String |
firstName
|
protected String |
info
|
protected boolean |
isAdmin
|
protected boolean |
isAdminRead
|
protected boolean |
isEmailVisible
|
protected boolean |
isEmailVisibleRead
|
protected String |
jobTitle
|
protected String |
language
|
protected String |
login
|
protected String |
mobile
|
protected String |
name
|
protected String |
organization
|
protected String |
phone
|
protected 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 | |
---|---|
String |
getAddress()
Retrieve the postal address of this Member. |
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. |
String |
getFirstName()
Retrieve the first name of this Member. |
String |
getInfo()
Retrieve the information on this Member. |
String |
getJobTitle()
Retrieve the Job Title of this Member. |
String |
getLanguage()
Retrieve the language on this Member. |
String |
getLogin()
Retrieve the login of this Member. |
String |
getMobile()
Retrieve the mobile phone number of this Member. |
String |
getName()
Retrieve the last name of this Member. |
String |
getOrganization()
Retrieve the organization of this Member. |
String |
getPhone()
Retrieve the phone number of this Member. |
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 String login
protected String name
protected String firstName
protected String email
protected boolean isEmailVisible
protected boolean isEmailVisibleRead
protected String salutation
protected String organization
protected String jobTitle
protected String phone
protected String mobile
protected String address
protected String info
protected int usage
protected 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 String getLogin()
public String getName()
public String getFirstName()
public String getEmail()
public boolean isEmailVisible()
public String getSalutation()
public String getOrganization()
public String getJobTitle()
public String getPhone()
public String getMobile()
public String getAddress()
public String getInfo()
public int getUsage()
public 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 |