using actual classes not interfaces (reduces gwt compiled js)
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/rmp-common-library@65438 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
da7ca3319f
commit
d5070c094d
|
@ -11,28 +11,28 @@
|
||||||
****************************************************************************
|
****************************************************************************
|
||||||
* Filename: LocalStatus.java
|
* Filename: LocalStatus.java
|
||||||
****************************************************************************
|
****************************************************************************
|
||||||
* @author <a href="mailto:daniele.strollo@isti.cnr.it">Daniele Strollo</a>
|
* @author <a href="mailto:massimiliano,assante@isti.cnr.it">Massimiliano Assante</a>
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
|
|
||||||
package org.gcube.resourcemanagement.support.client.utils;
|
package org.gcube.resourcemanagement.support.client.utils;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Vector;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Here represented the local status of the client side application.
|
* Here represented the local status of the client side application.
|
||||||
* @author Daniele Strollo (ISTI-CNR)
|
* @author Massimilianio Assante (ISTI-CNR)
|
||||||
*/
|
*/
|
||||||
public class LocalStatus {
|
public class LocalStatus {
|
||||||
private final List<String> availableScopes = new Vector<String>();
|
private final ArrayList<String> availableScopes = new ArrayList<String>();
|
||||||
private final List<String> deployReports = new Vector<String>();
|
private final ArrayList<String> deployReports = new ArrayList<String>();
|
||||||
private static final LocalStatus INSTANCE = new LocalStatus();
|
private static final LocalStatus INSTANCE = new LocalStatus();
|
||||||
|
|
||||||
public static synchronized LocalStatus getInstance() {
|
public static synchronized LocalStatus getInstance() {
|
||||||
return INSTANCE;
|
return INSTANCE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final List<String> getAvailableScopes() {
|
public final ArrayList<String> getAvailableScopes() {
|
||||||
return this.availableScopes;
|
return this.availableScopes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class ISClientRequester {
|
||||||
CACHE.empty();
|
CACHE.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final List<String> getResourceTypes(
|
private static final ArrayList<String> getResourceTypes(
|
||||||
final CacheManager status,
|
final CacheManager status,
|
||||||
final GCUBEScope queryScope)
|
final GCUBEScope queryScope)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
@ -110,7 +110,7 @@ public class ISClientRequester {
|
||||||
}
|
}
|
||||||
|
|
||||||
String type = null;
|
String type = null;
|
||||||
List<String> types = new Vector<String>();
|
ArrayList<String> types = new ArrayList<String>();
|
||||||
try {
|
try {
|
||||||
for (XMLResult elem : results) {
|
for (XMLResult elem : results) {
|
||||||
|
|
||||||
|
@ -148,13 +148,13 @@ public class ISClientRequester {
|
||||||
return types;
|
return types;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final List<String> getResourceSubTypes(
|
private static final ArrayList<String> getResourceSubTypes(
|
||||||
final CacheManager status,
|
final CacheManager status,
|
||||||
final GCUBEScope queryScope,
|
final GCUBEScope queryScope,
|
||||||
final String resourceType)
|
final String resourceType)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
|
|
||||||
List<String> subtypes = new Vector<String>();
|
ArrayList<String> subtypes = new ArrayList<String>();
|
||||||
if (resourceType.equals("Collection")) {
|
if (resourceType.equals("Collection")) {
|
||||||
subtypes.add("System");
|
subtypes.add("System");
|
||||||
subtypes.add("User");
|
subtypes.add("User");
|
||||||
|
@ -218,15 +218,15 @@ public class ISClientRequester {
|
||||||
* @return a list of string tuples (type, subtype)
|
* @return a list of string tuples (type, subtype)
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static final Map<String, List<String>> getResourcesTree( //qui si perde
|
public static final HashMap<String, ArrayList<String>> getResourcesTree( //qui si perde
|
||||||
final CacheManager status,
|
final CacheManager status,
|
||||||
final GCUBEScope queryScope)
|
final GCUBEScope queryScope)
|
||||||
throws Exception {
|
throws Exception {
|
||||||
Map<String, List<String>> retval = new HashMap<String, List<String>>();
|
HashMap<String, ArrayList<String>> retval = new HashMap<String, ArrayList<String>>();
|
||||||
|
|
||||||
// Loads the Resources
|
// Loads the Resources
|
||||||
List<String> types = getResourceTypes(status, queryScope);
|
ArrayList<String> types = getResourceTypes(status, queryScope);
|
||||||
List<String> subtypes = null;
|
ArrayList<String> subtypes = null;
|
||||||
|
|
||||||
for (String type : types) {
|
for (String type : types) {
|
||||||
try {
|
try {
|
||||||
|
@ -251,7 +251,7 @@ public class ISClientRequester {
|
||||||
if (results == null || results.size() == 0) {
|
if (results == null || results.size() == 0) {
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
subtypes = new Vector<String>();
|
subtypes = new ArrayList<String>();
|
||||||
for (XMLResult elem : results) {
|
for (XMLResult elem : results) {
|
||||||
subtypes.add(elem.toString());
|
subtypes.add(elem.toString());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue