added ScopeManager instead of GCUBEScope for operations cross infra

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/admin/resource-sweeper@65424 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2012-12-28 18:15:11 +00:00
parent 4474e3931c
commit c819019e3e
1 changed files with 5 additions and 5 deletions

View File

@ -22,10 +22,10 @@ import javax.xml.transform.TransformerFactory;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import org.gcube.common.core.scope.GCUBEScope;
import org.gcube.common.core.utils.logging.GCUBEClientLog;
import org.gcube.portlets.admin.resourcesweeper.client.async.SweeperService;
import org.gcube.portlets.admin.resourcesweeper.shared.SweeperActions;
import org.gcube.resourcemanagement.support.server.managers.scope.ScopeManager;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
@ -50,13 +50,13 @@ public class SweeperServiceImpl extends RemoteServiceServlet implements SweeperS
try {
switch (action) {
case GET_GHN_MOVE_TO_UNREACHABLE: {
List<String> ghnList = sweeper.getExpiredGHNs(GCUBEScope.getScope(scope));
List<String> ghnList = sweeper.getExpiredGHNs(ScopeManager.getScope(scope));
return filterExpiredGHNs(ghnList);
}
case GET_GHN_DELETE:
return sweeper.getDeadGHNs(GCUBEScope.getScope(scope));
return sweeper.getDeadGHNs(ScopeManager.getScope(scope));
case GET_RI_DELETE:
return sweeper.getOrphanRI(GCUBEScope.getScope(scope));
return sweeper.getOrphanRI(ScopeManager.getScope(scope));
default:
return null;
}
@ -73,7 +73,7 @@ public class SweeperServiceImpl extends RemoteServiceServlet implements SweeperS
public void applySweep(String scope, List<ModelData> elems) {
Sweeper sweeper = new Sweeper();
try {
sweeper.applySweep(GCUBEScope.getScope(scope), elems);
sweeper.applySweep(ScopeManager.getScope(scope), elems);
} catch (Exception e) {
_log.error(e.getMessage());
e.printStackTrace();