Mercury-IM/entity/src/main/java/org/mercury_im/messenger/entity/Account.java

42 lines
696 B
Java
Raw Normal View History

2019-11-18 23:51:27 +01:00
package org.mercury_im.messenger.entity;
2019-12-21 16:30:14 +01:00
import java.util.UUID;
/**
* User Account entity.
2019-12-06 20:48:27 +01:00
*
* An implementation of this entity can be found as {@link IAccount}.
*/
public interface Account {
2020-01-04 22:56:34 +01:00
UUID UNASSIGNED = UUID.fromString("00000000-0000-0000-0000-000000000000");
2019-12-21 16:30:14 +01:00
void setId(UUID id);
2019-12-21 16:30:14 +01:00
UUID getId();
void setAddress(String address);
String getAddress();
void setPassword(String password);
String getPassword();
2019-12-21 01:45:30 +01:00
void setHost(String host);
2019-12-21 01:45:30 +01:00
String getHost();
2019-12-21 01:45:30 +01:00
void setPort(int port);
2019-12-21 01:45:30 +01:00
int getPort();
2019-12-21 01:45:30 +01:00
void setEnabled(boolean enabled);
2019-12-21 01:45:30 +01:00
boolean isEnabled();
2019-12-21 04:08:59 +01:00
default String displayName() {
return getAddress();
}
}