package com.perforce.workshop.tjuricek.initializer.model; /** * This defines a user to be created within the Perforce server. * * The first user you define will need to be the super user. With security set * up this user is how we'll generally execute all tasks. */ public class PerforceUser { private String login; private String email; private String password; private String name; private boolean zuper; private boolean admin; private boolean guest; public PerforceUser() { this.zuper = false; this.admin = false; this.guest = false; } public PerforceUser(String login, String email, String password, String name) { this(); this.login = login; this.email = email; this.password = password; this.name = name; } public String getLogin() { return login; } public void setLogin(String login) { this.login = login; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getName() { return name; } public void setName(String name) { this.name = name; } public boolean isSuper() { return zuper; } public void setSuper(boolean zuper) { this.zuper = zuper; } public boolean isAdmin() { return admin; } public void setAdmin(boolean admin) { this.admin = admin; } public boolean isGuest() { return guest; } public void setGuest(boolean guest) { this.guest = guest; } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PerforceUser that = (PerforceUser) o; if (admin != that.admin) return false; if (guest != that.guest) return false; if (zuper != that.zuper) return false; if (email != null ? !email.equals(that.email) : that.email != null) return false; if (login != null ? !login.equals(that.login) : that.login != null) return false; if (name != null ? !name.equals(that.name) : that.name != null) return false; if (password != null ? !password.equals(that.password) : that.password != null) return false; return true; } @Override public int hashCode() { int result = login != null ? login.hashCode() : 0; result = 31 * result + (email != null ? email.hashCode() : 0); result = 31 * result + (password != null ? password.hashCode() : 0); result = 31 * result + (name != null ? name.hashCode() : 0); result = 31 * result + (zuper ? 1 : 0); result = 31 * result + (admin ? 1 : 0); result = 31 * result + (guest ? 1 : 0); return result; } @Override public String toString() { return "PerforceUser{" + "login='" + login + '\'' + ", email='" + email + '\'' + ", password='" + password + '\'' + ", name='" + name + '\'' + ", zuper=" + zuper + ", admin=" + admin + ", guest=" + guest + '}'; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 9165 | tjuricek |
Some documentation framework and a fatjar style distribution for the initializer to run outside of a gradle plugin. Upped the version to 0.1.2, but this may need some testing before it's really guaranteed to work in standalone mode |
||
//guest/tjuricek/initializer/src/main/java/com/perforce/workspace/tjuricek/initializer/model/PerforceUser.java | |||||
#1 | 9088 | tjuricek |
0.1.0 First version of the initializer. This currently requires setting up a local version of the p4java_ext project, since that project is awating approval into the main jcenter repository. |