99 lines
1.6 KiB
Java
99 lines
1.6 KiB
Java
|
package org.gcube.common.storagehubwrapper.shared;
|
||
|
|
||
|
import java.io.Serializable;
|
||
|
|
||
|
/**
|
||
|
* The Class Member.
|
||
|
*
|
||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||
|
*
|
||
|
* Apr 29, 2022
|
||
|
*/
|
||
|
public class Member implements Serializable {
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
*/
|
||
|
private static final long serialVersionUID = 1454948336452658186L;
|
||
|
|
||
|
/**
|
||
|
* The Enum TYPE.
|
||
|
*
|
||
|
* @author Francesco Mangiacrapa at ISTI-CNR francesco.mangiacrapa@isti.cnr.it
|
||
|
*
|
||
|
* Apr 29, 2022
|
||
|
*/
|
||
|
public static enum TYPE {
|
||
|
USER, GROUP
|
||
|
}
|
||
|
|
||
|
private String identity;
|
||
|
private TYPE memberType;
|
||
|
|
||
|
/**
|
||
|
* Instantiates a new member.
|
||
|
*/
|
||
|
public Member() {
|
||
|
|
||
|
}
|
||
|
|
||
|
public Member(String identity, TYPE memberType) {
|
||
|
super();
|
||
|
this.identity = identity;
|
||
|
this.memberType = memberType;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Gets the identity.
|
||
|
*
|
||
|
* @return the identity
|
||
|
*/
|
||
|
public String getIdentity() {
|
||
|
return identity;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Gets the member type.
|
||
|
*
|
||
|
* @return the member type
|
||
|
*/
|
||
|
public TYPE getMemberType() {
|
||
|
return memberType;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Sets the identity.
|
||
|
*
|
||
|
* @param identity the new identity
|
||
|
*/
|
||
|
public void setIdentity(String identity) {
|
||
|
this.identity = identity;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Sets the member type.
|
||
|
*
|
||
|
* @param memberType the new member type
|
||
|
*/
|
||
|
public void setMemberType(TYPE memberType) {
|
||
|
this.memberType = memberType;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* To string.
|
||
|
*
|
||
|
* @return the string
|
||
|
*/
|
||
|
@Override
|
||
|
public String toString() {
|
||
|
StringBuilder builder = new StringBuilder();
|
||
|
builder.append("Member [identity=");
|
||
|
builder.append(identity);
|
||
|
builder.append(", memberType=");
|
||
|
builder.append(memberType);
|
||
|
builder.append("]");
|
||
|
return builder.toString();
|
||
|
}
|
||
|
|
||
|
}
|