|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.netmera.mobile.NetmeraUser
public class NetmeraUser
NetmeraUser
object is for managing users of the application. You can
register, update, login users with this class.
Constructor Summary | |
---|---|
NetmeraUser()
Default constructor to create user object. |
Method Summary | |
---|---|
void |
activateUser(java.lang.String email)
Activates the registered User. |
void |
deactivateUser(java.lang.String email)
Deactivates the registered User |
static NetmeraUser |
getCurrentUser()
Returns the current logged user. |
java.util.Map<java.lang.String,java.lang.Object> |
getCustomFields()
|
java.lang.String |
getEmail()
Returns the email of the user |
java.lang.String |
getName()
Returns the name of the user |
java.lang.String |
getNickname()
Returns the nickname of the user |
java.lang.String |
getSurname()
Returns the surname of the user |
boolean |
isGeneratedMail()
Returns the mail status of the user. |
boolean |
isNewUser()
Returns the status of the user. |
static NetmeraUser |
login(java.lang.String email,
java.lang.String password)
Logs a user into the registered application. |
static NetmeraUser |
loginAsGuest()
Logs a guest into the application. |
static void |
loginAsGuestInBackground(NetmeraCallback<NetmeraUser> callback)
Logs a guest into the application in the background thread. |
static void |
loginInBackground(java.lang.String email,
java.lang.String password,
NetmeraCallback<NetmeraUser> callback)
Logs the user into the registered application in the background thread. |
static void |
logout()
User logged out from the application. |
void |
register()
Registers new user. |
void |
registerInBackground(NetmeraCallback<NetmeraUser> callback)
Registers user in the background thread. |
void |
setCustomFields(java.util.Map<java.lang.String,java.lang.Object> customFields)
|
void |
setEmail(java.lang.String email)
Sets the email of the user |
void |
setName(java.lang.String name)
Sets the name of the user |
void |
setNickname(java.lang.String nickname)
Sets the nickname of the user |
void |
setPassword(java.lang.String password)
Sets the password of the user |
void |
setSurname(java.lang.String surname)
Sets the surname of the user |
void |
update()
Updates user info. |
void |
updateInBackground(NetmeraCallback<NetmeraUser> callback)
Updates user info in the background thread. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NetmeraUser()
Method Detail |
---|
public java.lang.String getEmail()
public void setEmail(java.lang.String email)
email
- of the userpublic void setPassword(java.lang.String password)
password
- of the userpublic java.lang.String getNickname()
public void setNickname(java.lang.String nickname)
nickname
- of the userpublic java.lang.String getName()
public void setName(java.lang.String name)
name
- of the userpublic java.lang.String getSurname()
public void setSurname(java.lang.String surname)
surname
- of the userpublic java.util.Map<java.lang.String,java.lang.Object> getCustomFields()
public void setCustomFields(java.util.Map<java.lang.String,java.lang.Object> customFields)
public boolean isNewUser()
true
public boolean isGeneratedMail()
false
public static NetmeraUser getCurrentUser() throws NetmeraException
NetmeraException
public void register() throws NetmeraException
NetmeraUser
should be setted. Those are
the compulsory fields. There are also optional name and surname fields.
NetmeraUser user = new NetmeraUser();
user.setEmail("test@test.com");
user.setNickname("test");
user.setPassword("123456");
user.register();
NetmeraException
public void registerInBackground(NetmeraCallback<NetmeraUser> callback)
register()
method.
callback
- NetmeraCallback.onFail(NetmeraException)
or
NetmeraCallback.onSuccess(Object)
methods called when
register operation finishes.public void update() throws NetmeraException
NetmeraUser
should be setted. Those are the
compulsory fields.
NetmeraException
public void updateInBackground(NetmeraCallback<NetmeraUser> callback)
update()
method.
callback
- NetmeraCallback.onFail(NetmeraException)
or
NetmeraCallback.onSuccess(Object)
methods called when
update operation finishes.public static NetmeraUser login(java.lang.String email, java.lang.String password) throws NetmeraException
email
- of the userpassword
- of the user
NetmeraException
public static void loginInBackground(java.lang.String email, java.lang.String password, NetmeraCallback<NetmeraUser> callback)
login()
method.
email
- of the userpassword
- of the usercallback
- NetmeraCallback.onFail(NetmeraException)
or
NetmeraCallback.onSuccess(Object)
methods called when
login operation finishes.public static NetmeraUser loginAsGuest() throws NetmeraException
NetmeraException
public static void loginAsGuestInBackground(NetmeraCallback<NetmeraUser> callback)
loginAsGuest()
method.
callback
- NetmeraCallback.onFail(NetmeraException)
or
NetmeraCallback.onSuccess(Object)
methods called when
guest login operation finishes.public static void logout()
public void activateUser(java.lang.String email) throws NetmeraException
email
- of the user
NetmeraException
public void deactivateUser(java.lang.String email) throws NetmeraException
email
- of the user
NetmeraException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |