fr.delthas.skype.Role Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of javaskype Show documentation
Show all versions of javaskype Show documentation
An API for Skype using MSNP24
package fr.delthas.skype;
/**
* A role of a user in a group.
*/
public enum Role {
/**
* An admin user: can add/remove users, change the topic, and change users roles.
*/
ADMIN("admin"),
/**
* A regular user: can add users, change the topic, and remove himself from the group.
*/
USER("user");
private Role(String roleString) {
this.roleString = roleString;
}
private String roleString;
String getRoleString() {
return roleString;
}
static Role getRole(String roleString) {
for (int i = 0; i < Role.values().length; i++) {
if (Role.values()[i].roleString.equalsIgnoreCase(roleString)) {
return Role.values()[i];
}
}
throw new IllegalArgumentException("Unknown role string: " + roleString);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy