public class MemberElement extends DataElement
ClientSession clientSession = new ClientSession("http://www.example.com/"); JcmsApp jcmsApp = new JcmsApp(clientSession); JcmsResource memberResource = jcmsApp.getData("j_2"); MemberElement memberDataElement = MemberElement.getFirstMemberElement(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);
Modifier and Type | Field and Description |
---|---|
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 and Description |
---|
MemberElement(org.jdom.Element element,
ClientSession session)
Builds a new MemberElement from the specified xml Element and session
|
Modifier and Type | Method and Description |
---|---|
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.
|
getAbstractField, getAbstractMLName, getCdate, getDataElementList, getDataElementList, getDataType, getElement, getField, getFieldText, getFirstDataElement, getId, getMainLanguage, getMdate, getMLField, getPdate, getRelateds, getTitle, getUrl
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
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 retrievedpublic 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"); MemberElement memberDataElement = MemberElement.getFirstMemberElement(memberResource, clientSession);
resource
- session
- Copyright © 2001-2021 Jalios SA. All Rights Reserved.