package com.perforce.workspace.tjuricek.initializer.model; import java.util.ArrayList; import java.util.List; /** * Most data is seeded via these changelist definitions. * <p/> * The rank attribute is most likely critical here, take care not to edit * before an add. * <p/> * What you do not have to specify together is the login and the client. If you * only specify the login, we'll use a temporary client for the operations. */ public class PerforceChangelist { private String login; private String client; private String description; private List<PerforceAdd> adds; private List<PerforceEdit> edits; public PerforceChangelist() { this.adds = new ArrayList<PerforceAdd>(); this.edits = new ArrayList<PerforceEdit>(); } public String getLogin() { return login; } public void setLogin(String login) { this.login = login; } public String getClient() { return client; } public void setClient(String client) { this.client = client; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public List<PerforceAdd> getAdds() { return adds; } public void setAdds(List<PerforceAdd> adds) { this.adds = adds; } public void addAdd(PerforceAdd add) { this.adds.add(add); // the mighty adder } public List<PerforceEdit> getEdits() { return edits; } public void setEdits(List<PerforceEdit> edits) { this.edits = edits; } public void addEdit(PerforceEdit edit) { this.edits.add(edit); } @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; PerforceChangelist that = (PerforceChangelist) o; if (adds != null ? !adds.equals(that.adds) : that.adds != null) return false; if (client != null ? !client.equals(that.client) : that.client != null) return false; if (description != null ? !description.equals(that.description) : that.description != null) return false; if (edits != null ? !edits.equals(that.edits) : that.edits != null) return false; if (login != null ? !login.equals(that.login) : that.login != null) return false; return true; } @Override public int hashCode() { int result = login != null ? login.hashCode() : 0; result = 31 * result + (client != null ? client.hashCode() : 0); result = 31 * result + (description != null ? description.hashCode() : 0); result = 31 * result + (adds != null ? adds.hashCode() : 0); result = 31 * result + (edits != null ? edits.hashCode() : 0); return result; } @Override public String toString() { return "PerforceChangelist{" + "login='" + login + '\'' + ", client='" + client + '\'' + ", description='" + description + '\'' + ", adds=" + adds + ", edits=" + edits + '}'; } }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#2 | 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 |
||
#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. |