2014-02-17 15:56:42 +01:00
|
|
|
/**
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
package org.gcube.portlets.user.workspace.shared;
|
|
|
|
|
|
|
|
import java.util.ArrayList;
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
/**
|
|
|
|
*
|
2019-02-22 12:18:03 +01:00
|
|
|
* @author Francesco Mangiacrapa francesco.mangiacrapaATisti.cnr.it
|
|
|
|
* Feb 17, 2014
|
2014-02-17 15:56:42 +01:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
public enum WorkspaceTrashOperation {
|
|
|
|
|
|
|
|
//SHOW TRASH WINDOW
|
2014-05-13 11:10:54 +02:00
|
|
|
SHOW("Show", "Show"),
|
2014-02-17 15:56:42 +01:00
|
|
|
|
|
|
|
//CALLING OPERATION SERVER
|
|
|
|
REFRESH("Refresh", "Refresh trash content"),
|
2014-05-13 17:46:06 +02:00
|
|
|
RESTORE("Restore", "Restore the trash item/s (selected)"),
|
2014-02-17 15:56:42 +01:00
|
|
|
RESTORE_ALL("Restore All", "Restore all trash content"),
|
2014-05-13 17:46:06 +02:00
|
|
|
DELETE_PERMANENTLY("Delete Permanently", "Delete Permanently the trash item/s (selected)"),
|
2014-02-17 15:56:42 +01:00
|
|
|
EMPTY_TRASH("Empty", "Empty definitively trash content");
|
|
|
|
|
|
|
|
public String label;
|
|
|
|
public String operationDescription;
|
|
|
|
|
|
|
|
WorkspaceTrashOperation(String label, String description)
|
|
|
|
{
|
|
|
|
this.label = label;
|
|
|
|
this.operationDescription = description;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return the label
|
|
|
|
*/
|
|
|
|
public String getLabel() {
|
|
|
|
return label;
|
|
|
|
}
|
|
|
|
|
|
|
|
public static List<String> getListLabels(){
|
|
|
|
|
|
|
|
List<String> listLabels = new ArrayList<String>();
|
|
|
|
|
|
|
|
for (WorkspaceTrashOperation item : WorkspaceTrashOperation.values())
|
|
|
|
listLabels.add(item.getLabel());
|
|
|
|
|
|
|
|
return listLabels;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static WorkspaceTrashOperation valueOfLabel(String label)
|
|
|
|
{
|
|
|
|
for (WorkspaceTrashOperation value:values()) if (value.getLabel().equals(label)) return value;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getOperationDescription() {
|
|
|
|
return operationDescription;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|