2019-11-18 23:51:27 +01:00
|
|
|
package org.mercury_im.messenger.entity;
|
2019-11-03 06:33:52 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* User Account entity.
|
2019-12-06 20:48:27 +01:00
|
|
|
*
|
|
|
|
* An implementation of this entity can be found as {@link IAccount}.
|
2019-11-03 06:33:52 +01:00
|
|
|
*/
|
2019-11-18 00:04:28 +01:00
|
|
|
public interface Account {
|
2019-11-03 06:33:52 +01:00
|
|
|
|
|
|
|
void setId(long id);
|
|
|
|
|
|
|
|
long getId();
|
|
|
|
|
2019-11-18 00:04:28 +01:00
|
|
|
void setAddress(String address);
|
2019-11-03 06:33:52 +01:00
|
|
|
|
2019-11-18 00:04:28 +01:00
|
|
|
String getAddress();
|
2019-11-03 06:33:52 +01:00
|
|
|
|
2019-12-21 00:27:48 +01:00
|
|
|
void setPassword(String password);
|
|
|
|
|
|
|
|
String getPassword();
|
|
|
|
|
|
|
|
@Deprecated
|
2019-11-18 00:04:28 +01:00
|
|
|
void setAuthentication(AuthMethod authentication);
|
2019-11-03 06:33:52 +01:00
|
|
|
|
2019-12-21 00:27:48 +01:00
|
|
|
@Deprecated
|
2019-11-18 00:04:28 +01:00
|
|
|
AuthMethod getAuthentication();
|
2019-11-03 06:33:52 +01:00
|
|
|
|
|
|
|
void setEnabled(boolean enabled);
|
|
|
|
|
|
|
|
boolean isEnabled();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Interface to allow protocol-specific authentication information, like passwords, parameters,
|
|
|
|
* certificates etc.
|
|
|
|
*/
|
|
|
|
interface AuthMethod {
|
|
|
|
|
2019-11-18 00:04:28 +01:00
|
|
|
String getPassword();
|
2019-11-03 06:33:52 +01:00
|
|
|
}
|
|
|
|
}
|