forked from gCubeSystem/rmp-common-library
Fix for Incident #148, Resource Sweeper does not sweep GHN Resources
git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portlets/admin/rmp-common-library@114880 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
44f943a78a
commit
e28d66f6db
|
@ -1,15 +1,23 @@
|
||||||
<ReleaseNotes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
<ReleaseNotes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xsi:noNamespaceSchemaLocation="xsd/changelog.xsd">
|
xsi:noNamespaceSchemaLocation="xsd/changelog.xsd">
|
||||||
|
<Changeset component="org.gcube.resourcemanagement.support.2-2-1"
|
||||||
|
date="2014-05-25">
|
||||||
|
<Change>Fix for Incident #148, Resource Sweeper does not sweep GHN Resources</Change>
|
||||||
|
</Changeset>
|
||||||
<Changeset component="org.gcube.resourcemanagement.support.2-2-0"
|
<Changeset component="org.gcube.resourcemanagement.support.2-2-0"
|
||||||
date="2014-12-09">
|
date="2014-12-09">
|
||||||
<Change>Modified xqueries for showing SmartGears and SmarGearsBundle version</Change>
|
<Change>Modified xqueries for showing SmartGears and SmarGearsBundle
|
||||||
|
version</Change>
|
||||||
<Change>Updated label names for the gHN grid columns</Change>
|
<Change>Updated label names for the gHN grid columns</Change>
|
||||||
<Change>Modified xquery to fix bug about wrong scoped generic resource</Change>
|
<Change>Modified xquery to fix bug about wrong scoped generic resource
|
||||||
|
</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.resourcemanagement.support.2-1-0"
|
<Changeset component="org.gcube.resourcemanagement.support.2-1-0"
|
||||||
date="2014-12-09">
|
date="2014-12-09">
|
||||||
<Change>Modified xquery to get also the hostname info about service endpoints in a given scope</Change>
|
<Change>Modified xquery to get also the hostname info about service
|
||||||
<Change>Modified the Resource detail model class to in shared package to support the change explained above</Change>
|
endpoints in a given scope</Change>
|
||||||
|
<Change>Modified the Resource detail model class to in shared package
|
||||||
|
to support the change explained above</Change>
|
||||||
</Changeset>
|
</Changeset>
|
||||||
<Changeset component="org.gcube.resourcemanagement.support.2-0-0"
|
<Changeset component="org.gcube.resourcemanagement.support.2-0-0"
|
||||||
date="2013-10-21">
|
date="2013-10-21">
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.portlets.admin</groupId>
|
<groupId>org.gcube.portlets.admin</groupId>
|
||||||
<artifactId>rmp-common-library</artifactId>
|
<artifactId>rmp-common-library</artifactId>
|
||||||
<version>2.2.0-SNAPSHOT</version>
|
<version>2.2.1-SNAPSHOT</version>
|
||||||
<name>Resource Management Library</name>
|
<name>Resource Management Library</name>
|
||||||
<description>
|
<description>
|
||||||
gCube Resource Management Library is a common library containing shared code for Information System Operations
|
gCube Resource Management Library is a common library containing shared code for Information System Operations
|
||||||
|
|
|
@ -18,11 +18,9 @@ package org.gcube.resourcemanagement.support.server.managers.resources;
|
||||||
|
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
|
|
||||||
import javax.xml.bind.JAXBContext;
|
|
||||||
import javax.xml.bind.Unmarshaller;
|
|
||||||
|
|
||||||
import org.gcube.common.resources.gcore.HostingNode;
|
import org.gcube.common.resources.gcore.HostingNode;
|
||||||
import org.gcube.common.resources.gcore.Resource;
|
import org.gcube.common.resources.gcore.Resource;
|
||||||
|
import org.gcube.common.resources.gcore.Resources;
|
||||||
import org.gcube.common.scope.api.ScopeProvider;
|
import org.gcube.common.scope.api.ScopeProvider;
|
||||||
import org.gcube.common.scope.impl.ScopeBean;
|
import org.gcube.common.scope.impl.ScopeBean;
|
||||||
import org.gcube.common.vremanagement.ghnmanager.client.GHNManagerLibrary;
|
import org.gcube.common.vremanagement.ghnmanager.client.GHNManagerLibrary;
|
||||||
|
@ -193,10 +191,7 @@ public class GHNManager extends AbstractResourceManager {
|
||||||
@Override
|
@Override
|
||||||
protected final Resource buildResource(final String xmlRepresentation) throws AbstractResourceException {
|
protected final Resource buildResource(final String xmlRepresentation) throws AbstractResourceException {
|
||||||
try {
|
try {
|
||||||
JAXBContext ctx = JAXBContext.newInstance(HostingNode.class);
|
HostingNode deserialised = Resources.unmarshal(HostingNode.class, new StringReader(xmlRepresentation));
|
||||||
Unmarshaller unmarshaller = ctx.createUnmarshaller();
|
|
||||||
StringReader reader = new StringReader(xmlRepresentation);
|
|
||||||
HostingNode deserialised = (HostingNode) unmarshaller.unmarshal(reader);
|
|
||||||
return deserialised;
|
return deserialised;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
throw new ResourceAccessException("Cannot load the stub for resource " + this.getType(), e);
|
throw new ResourceAccessException("Cannot load the stub for resource " + this.getType(), e);
|
||||||
|
|
Loading…
Reference in New Issue