vre-modeler/src/org/gcube/vremanagement/vremodeler/impl/ModelerResource.java

39 lines
878 B
Java
Raw Normal View History

package org.gcube.vremanagement.vremodeler.impl;
import org.gcube.common.core.state.GCUBEWSResource;
import org.globus.wsrf.ResourceException;
public class ModelerResource extends GCUBEWSResource {
protected static final String RP_ID = "Id";
protected static String[] RPNames = { RP_ID};
@Override
protected void initialise(Object... arg0) throws ResourceException {
}
/**
* {@inheritDoc}
*/
public String[] getPropertyNames() {
return RPNames;
}
/**
* Returns the id.
*
* @return the id.
*/
public String getId() throws ResourceException {
return (String) this.getResourcePropertySet().get(RP_ID).get(0);
}
protected synchronized void setId(String id) throws Exception {
this.getResourcePropertySet().get(RP_ID).clear();
this.getResourcePropertySet().get(RP_ID).add(id);
}
}