2014-02-11 12:53:10 +01:00
|
|
|
package org.gcube.portlets.user.workspace.shared;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
2014-02-21 11:06:32 +01:00
|
|
|
|
2014-02-11 12:53:10 +01:00
|
|
|
/**
|
|
|
|
*
|
2014-02-21 11:06:32 +01:00
|
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapa@isti.cnr.it
|
|
|
|
* @Feb 21, 2014
|
2014-02-11 12:53:10 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
public class WorkspaceACL implements Serializable{
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
private static final long serialVersionUID = -1682851324671600049L;
|
|
|
|
|
|
|
|
private String id;
|
|
|
|
private String label;
|
2014-02-11 16:41:56 +01:00
|
|
|
private boolean defaultValue;
|
|
|
|
private USER_TYPE userType;
|
2014-02-11 19:18:14 +01:00
|
|
|
|
|
|
|
private String description;
|
2014-02-13 15:19:42 +01:00
|
|
|
|
|
|
|
|
2014-02-11 12:53:10 +01:00
|
|
|
public enum USER_TYPE{ADMINISTRATOR, GROUP, OWNER, OTHER};
|
|
|
|
|
2014-02-11 19:18:14 +01:00
|
|
|
public WorkspaceACL(String id, String label, boolean defaultValue, USER_TYPE userType, String description) {
|
2014-02-11 12:53:10 +01:00
|
|
|
super();
|
|
|
|
this.id = id;
|
|
|
|
this.label = label;
|
2014-02-11 16:41:56 +01:00
|
|
|
this.defaultValue = defaultValue;
|
|
|
|
this.userType = userType;
|
2014-02-11 19:18:14 +01:00
|
|
|
this.description = description;
|
2014-02-11 12:53:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public WorkspaceACL() {
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getId() {
|
|
|
|
return id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setId(String id) {
|
|
|
|
this.id = id;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getLabel() {
|
|
|
|
return label;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setLabel(String label) {
|
|
|
|
this.label = label;
|
|
|
|
}
|
|
|
|
|
2014-02-11 16:41:56 +01:00
|
|
|
public boolean getDefaultValue() {
|
|
|
|
return defaultValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setDefaultValue(boolean defaultValue) {
|
|
|
|
this.defaultValue = defaultValue;
|
|
|
|
}
|
|
|
|
|
|
|
|
public USER_TYPE getUserType() {
|
|
|
|
return userType;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setUserType(USER_TYPE userType) {
|
|
|
|
this.userType = userType;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2014-02-11 19:18:14 +01:00
|
|
|
public String getDescription() {
|
|
|
|
return description;
|
|
|
|
}
|
2014-02-11 16:41:56 +01:00
|
|
|
|
2014-02-11 19:18:14 +01:00
|
|
|
public void setDescription(String description) {
|
|
|
|
this.description = description;
|
|
|
|
}
|
|
|
|
|
2014-02-21 11:06:32 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public String toString() {
|
|
|
|
StringBuilder builder = new StringBuilder();
|
|
|
|
builder.append("WorkspaceACL [id=");
|
|
|
|
builder.append(id);
|
|
|
|
builder.append(", label=");
|
|
|
|
builder.append(label);
|
|
|
|
builder.append(", defaultValue=");
|
|
|
|
builder.append(defaultValue);
|
|
|
|
builder.append(", userType=");
|
|
|
|
builder.append(userType);
|
|
|
|
builder.append(", description=");
|
|
|
|
builder.append(description);
|
|
|
|
builder.append("]");
|
|
|
|
return builder.toString();
|
|
|
|
}
|
2014-02-11 12:53:10 +01:00
|
|
|
}
|