ref 11720: TDM - Update to StorageHUB
https://support.d4science.org/issues/11879 Updated to StorageHub git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/widgets/data-miner-manager-widget@169616 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
032be968e2
commit
ef12c0b585
2
pom.xml
2
pom.xml
|
@ -259,7 +259,7 @@
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.gcube.portlets.widgets</groupId>
|
<groupId>org.gcube.portlets.widgets</groupId>
|
||||||
<artifactId>workspace-uploader</artifactId>
|
<artifactId>workspace-uploader</artifactId>
|
||||||
<version>[2.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
|
<version>[1.0.0-SNAPSHOT,3.0.0-SNAPSHOT)</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- OpenLayer Basic Widget -->
|
<!-- OpenLayer Basic Widget -->
|
||||||
|
|
|
@ -158,14 +158,15 @@ public class FileFld extends AbstractFld {
|
||||||
showableTypes.addAll(Arrays.asList(ItemType.values()));
|
showableTypes.addAll(Arrays.asList(ItemType.values()));
|
||||||
|
|
||||||
wselectDialog = new WorkspaceExplorerSelectDialog("Select File", false);
|
wselectDialog = new WorkspaceExplorerSelectDialog("Select File", false);
|
||||||
// filterCriteria, selectableTypes);
|
|
||||||
|
|
||||||
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
|
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelectedItem(Item item) {
|
public void onSelectedItem(Item item) {
|
||||||
|
|
||||||
if (item.isFolder() || item.isRoot()) {
|
if (item == null || item.getType() == ItemType.FOLDER || item.getType() == ItemType.PRIVATE_FOLDER
|
||||||
|
|| item.getType() == ItemType.SHARED_FOLDER || item.getType() == ItemType.VRE_FOLDER) {
|
||||||
|
|
||||||
UtilsGXT3.info("Attention", "Select a valid file!");
|
UtilsGXT3.info("Attention", "Select a valid file!");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -283,7 +284,7 @@ public class FileFld extends AbstractFld {
|
||||||
selectedFileItem.setPublicLink(tabularResourceData.getTabularResourceId());
|
selectedFileItem.setPublicLink(tabularResourceData.getTabularResourceId());
|
||||||
showFieldWithTRSelection();
|
showFieldWithTRSelection();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void retrieveFileInformation(final Item item) {
|
private void retrieveFileInformation(final Item item) {
|
||||||
Log.debug("Retrieved: " + item);
|
Log.debug("Retrieved: " + item);
|
||||||
final ItemDescription itemDescription = new ItemDescription(item.getId(), item.getName(), item.getOwner(),
|
final ItemDescription itemDescription = new ItemDescription(item.getId(), item.getName(), item.getOwner(),
|
||||||
|
|
|
@ -219,35 +219,19 @@ public class TabItem extends HBoxLayoutContainer {
|
||||||
List<ItemType> showableTypes = new ArrayList<ItemType>();
|
List<ItemType> showableTypes = new ArrayList<ItemType>();
|
||||||
showableTypes.addAll(Arrays.asList(ItemType.values()));
|
showableTypes.addAll(Arrays.asList(ItemType.values()));
|
||||||
|
|
||||||
/*
|
|
||||||
* "application/zip", "application/x-zip",
|
|
||||||
* "application/x-zip-compressed", "application/octet-stream",
|
|
||||||
* "application/x-compress", "application/x-compressed",
|
|
||||||
* "multipart/x-zip"
|
|
||||||
*/
|
|
||||||
// List<String> allowedMimeTypes =
|
|
||||||
// Arrays.asList("text/csv","text/plain","text/plain;
|
|
||||||
// charset=ISO-8859-1");
|
|
||||||
|
|
||||||
/**
|
|
||||||
* "zip"
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* List<String> allowedFileExtensions = Arrays.asList("csv");
|
|
||||||
*
|
|
||||||
* FilterCriteria filterCriteria = new FilterCriteria(allowedMimeTypes,
|
|
||||||
* allowedFileExtensions, new HashMap<String, String>());
|
|
||||||
*/
|
|
||||||
wselectDialog = new WorkspaceExplorerSelectDialog("Select CSV", false);
|
wselectDialog = new WorkspaceExplorerSelectDialog("Select CSV", false);
|
||||||
// filterCriteria, selectableTypes);
|
|
||||||
|
|
||||||
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
|
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelectedItem(Item item) {
|
public void onSelectedItem(Item item) {
|
||||||
|
|
||||||
if (item.isFolder() || item.isRoot()) {
|
if (item == null || item.getType() == ItemType.FOLDER
|
||||||
|
|| item.getType() == ItemType.PRIVATE_FOLDER
|
||||||
|
|| item.getType() == ItemType.SHARED_FOLDER
|
||||||
|
|| item.getType() == ItemType.VRE_FOLDER) {
|
||||||
|
|
||||||
UtilsGXT3.info("Attention", "Select a valid csv!");
|
UtilsGXT3.info("Attention", "Select a valid csv!");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -183,36 +183,17 @@ public class TabularFld extends AbstractFld implements HasTabularFldChangeEventH
|
||||||
showableTypes.addAll(Arrays.asList(ItemType.values()));
|
showableTypes.addAll(Arrays.asList(ItemType.values()));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
/*
|
|
||||||
* "application/zip", "application/x-zip",
|
|
||||||
* "application/x-zip-compressed", "application/octet-stream",
|
|
||||||
* "application/x-compress", "application/x-compressed",
|
|
||||||
* "multipart/x-zip"
|
|
||||||
*/
|
|
||||||
// List<String> allowedMimeTypes =
|
|
||||||
// Arrays.asList("text/csv","text/plain","text/plain;
|
|
||||||
// charset=ISO-8859-1");
|
|
||||||
|
|
||||||
/**
|
|
||||||
* "zip"
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*
|
|
||||||
* List<String> allowedFileExtensions = Arrays.asList("csv");
|
|
||||||
*
|
|
||||||
* FilterCriteria filterCriteria = new
|
|
||||||
* FilterCriteria(allowedMimeTypes, allowedFileExtensions, new
|
|
||||||
* HashMap<String, String>());
|
|
||||||
*/
|
|
||||||
wselectDialog = new WorkspaceExplorerSelectDialog("Select CSV", false);
|
wselectDialog = new WorkspaceExplorerSelectDialog("Select CSV", false);
|
||||||
// filterCriteria, selectableTypes);
|
|
||||||
|
|
||||||
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
|
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelectedItem(Item item) {
|
public void onSelectedItem(Item item) {
|
||||||
|
|
||||||
if (item.isFolder() || item.isRoot()) {
|
if (item == null || item.getType() == ItemType.FOLDER
|
||||||
|
|| item.getType() == ItemType.PRIVATE_FOLDER
|
||||||
|
|| item.getType() == ItemType.SHARED_FOLDER
|
||||||
|
|| item.getType() == ItemType.VRE_FOLDER) {
|
||||||
UtilsGXT3.info("Attention", "Select a valid csv!");
|
UtilsGXT3.info("Attention", "Select a valid csv!");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue