git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/information-system/gCubeIS/Registry@4486 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
0f21b3a936
commit
1f6381d20f
|
@ -117,10 +117,8 @@ public class RegistryFactory{
|
|||
* @throws ProfileAlreadyRegisteredFault
|
||||
*/
|
||||
public String createResource(CreateResourceMessage mess) throws SchemaValidationFault,RemoteException,ProfileAlreadyRegisteredFault {
|
||||
GCUBEResource resource;
|
||||
try {
|
||||
resource = GHNContext.getImplementation(GCUBEResource.class);
|
||||
}catch(Exception e) {throw new RemoteException("Error in GHNContext");}
|
||||
GCUBEResource resource=null;
|
||||
|
||||
logger.info("CreateResource operation invoked");
|
||||
logSecurityInfo("createResource");
|
||||
|
||||
|
@ -133,13 +131,15 @@ public class RegistryFactory{
|
|||
throw new RemoteException(msg);
|
||||
}
|
||||
|
||||
System.out.println("profile:" +profile);
|
||||
|
||||
try {
|
||||
ResourceType.valueOf(mess.getType()).getResourceClass().getClass().cast(resource);
|
||||
resource=ResourceType.valueOf(mess.getType()).getResourceClass();
|
||||
|
||||
resource.load(new BufferedReader(new InputStreamReader(new ByteArrayInputStream(profile.getBytes("UTF-8")), "UTF-8")));
|
||||
|
||||
if (mess.getType().compareTo(GCUBEGenericResource.TYPE)==0){
|
||||
System.out.println("profile:" +profile);
|
||||
System.out.println("------------");
|
||||
System.out.println(((GCUBEGenericResource) resource).getBody());
|
||||
}
|
||||
//the parse Profile class allows to extract from profiles information about type/SCOPE/UniqueID
|
||||
|
|
Loading…
Reference in New Issue