GenericRole.java 1.77 KB
/*
 * Decompiled with CFR 0_118.
 * 
 * Could not load the following classes:
 *  com.adobe.cq.projects.api.ProjectMemberRole
 */
package com.adobe.cq.projects.impl.team;

import com.adobe.cq.projects.api.ProjectMemberRole;
import com.adobe.cq.projects.impl.team.RoleClass;

public class GenericRole
implements ProjectMemberRole {
    private final String id;
    private final String displayName;
    private final RoleClass roleClass;
    private String[] defaultMembers = null;

    public GenericRole(String id, String displayName, RoleClass roleClass, String[] defaultMembers) {
        this.id = id;
        this.displayName = displayName;
        this.roleClass = roleClass;
        this.defaultMembers = defaultMembers;
    }

    public String getId() {
        return this.id;
    }

    public String getDisplayName() {
        return this.displayName;
    }

    public RoleClass getRoleClass() {
        return this.roleClass;
    }

    public String[] getDefaultMembers() {
        return this.defaultMembers;
    }

    public void setDefaultMembers(String[] defaultMembers) {
        this.defaultMembers = defaultMembers;
    }

    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof ProjectMemberRole)) {
            return false;
        }
        ProjectMemberRole that = (ProjectMemberRole)o;
        return this.id.equals(that.getId());
    }

    public int hashCode() {
        return this.id.hashCode();
    }

    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("GenericRole");
        sb.append("{id='").append(this.id).append('\'');
        sb.append(", displayName='").append(this.displayName).append('\'');
        sb.append('}');
        return sb.toString();
    }
}