enterprises.orbital.impl.evexmlapi.chr.ApiChatChannel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of eve-xml-api Show documentation
Show all versions of eve-xml-api Show documentation
Library to interact with EVE XML API servers
package enterprises.orbital.impl.evexmlapi.chr;
import java.util.ArrayList;
import java.util.List;
import enterprises.orbital.evexmlapi.chr.IChatChannel;
import enterprises.orbital.evexmlapi.chr.IChatChannelMember;
public class ApiChatChannel implements IChatChannel {
private long channelID;
private long ownerID;
private String ownerName;
private String displayName;
private String comparisonKey;
private boolean hasPassword;
private String motd;
private final List allowed = new ArrayList();
private final List blocked = new ArrayList();
private final List muted = new ArrayList();
private final List operators = new ArrayList();
@Override
public long getChannelID() {
return channelID;
}
public void setChannelID(long channelID) {
this.channelID = channelID;
}
@Override
public long getOwnerID() {
return ownerID;
}
public void setOwnerID(long ownerID) {
this.ownerID = ownerID;
}
@Override
public String getOwnerName() {
return ownerName;
}
public void setOwnerName(String ownerName) {
this.ownerName = ownerName;
}
@Override
public String getDisplayName() {
return displayName;
}
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
@Override
public String getComparisonKey() {
return comparisonKey;
}
public void setComparisonKey(String comparisonKey) {
this.comparisonKey = comparisonKey;
}
@Override
public boolean hasPassword() {
return hasPassword;
}
public void setHasPassword(boolean hasPassword) {
this.hasPassword = hasPassword;
}
@Override
public String getMOTD() {
return motd;
}
public void setMotd(String motd) {
this.motd = motd;
}
@Override
public List getAllowed() {
List result = new ArrayList();
result.addAll(allowed);
return result;
}
@Override
public List getBlocked() {
List result = new ArrayList();
result.addAll(blocked);
return result;
}
@Override
public List getMuted() {
List result = new ArrayList();
result.addAll(muted);
return result;
}
@Override
public List getOperators() {
List result = new ArrayList();
result.addAll(operators);
return result;
}
public void addMemberCollector(ChatChannelsParser.MemberCollector col) {
switch (col.getName()) {
case "allowed":
allowed.addAll(col.getMembers());
break;
case "blocked":
blocked.addAll(col.getMembers());
break;
case "muted":
muted.addAll(col.getMembers());
break;
case "operators":
operators.addAll(col.getMembers());
break;
default:
assert false;
}
}
}