@Path(value="/") public abstract class ResourceAwareService<T extends org.gcube.rest.commons.resourceawareservice.resources.StatefulResource> extends Object implements org.gcube.rest.commons.resourceawareservice.ResourceAwareServiceAPI<T>
| Constructor and Description |
|---|
ResourceAwareService(org.gcube.rest.commons.resourceawareservice.resources.ResourceFactory<T> factory,
org.gcube.rest.resourcemanager.publisher.ResourcePublisher<T> publisher,
org.gcube.rest.commons.filter.IResourceFilter<T> resourceFilter,
org.gcube.rest.commons.resourcefile.IResourceFileUtils<T> resourceFileUtils) |
@Inject public ResourceAwareService(org.gcube.rest.commons.resourceawareservice.resources.ResourceFactory<T> factory, org.gcube.rest.resourcemanager.publisher.ResourcePublisher<T> publisher, org.gcube.rest.commons.filter.IResourceFilter<T> resourceFilter, org.gcube.rest.commons.resourcefile.IResourceFileUtils<T> resourceFileUtils) throws ResourceAwareServiceException
ResourceAwareServiceException@POST
@Path(value="resources")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response createResourceREST(@HeaderParam(value="gcube-scope")
String scope,
@FormParam(value="jsonParam")
String jsonParam)
createResourceREST in interface org.gcube.rest.commons.resourceawareservice.ResourceAwareServiceRestAPI@GET
@Path(value="resources/{id}")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response getResourceREST(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID,
@DefaultValue(value="false") @QueryParam(value="pretty")
Boolean pretty)
getResourceREST in interface org.gcube.rest.commons.resourceawareservice.ResourceAwareServiceRestAPI@DELETE
@Path(value="resources/{id}")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response destroyResourceREST(@HeaderParam(value="gcube-scope")
String scope,
@PathParam(value="id")
String resourceID)
destroyResourceREST in interface org.gcube.rest.commons.resourceawareservice.ResourceAwareServiceRestAPI@GET
@Path(value="resources")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response listResourcesREST(@HeaderParam(value="gcube-scope")
String scope,
@DefaultValue(value="false") @QueryParam(value="complete")
Boolean complete,
@DefaultValue(value="false") @QueryParam(value="pretty")
Boolean pretty)
listResourcesREST in interface org.gcube.rest.commons.resourceawareservice.ResourceAwareServiceRestAPI@GET
@Path(value="resources/filter")
@Produces(value="application/json; charset=UTF-8")
public javax.ws.rs.core.Response filterResourcesREST(@HeaderParam(value="gcube-scope")
String scope,
@QueryParam(value="filter")
String filter,
@DefaultValue(value="false") @QueryParam(value="complete")
Boolean complete,
@DefaultValue(value="false") @QueryParam(value="pretty")
Boolean pretty)
filterResourcesREST in interface org.gcube.rest.commons.resourceawareservice.ResourceAwareServiceRestAPIpublic T getResource(String resourceID) throws ResourceNotFoundException
ResourceNotFoundExceptionpublic Collection<T> listResources()
public void saveResource(String resourceID) throws IOException, org.gcube.rest.resourcemanager.publisher.ResourcePublisherException
IOExceptionorg.gcube.rest.resourcemanager.publisher.ResourcePublisherExceptionpublic void loadResources()
public void onClose()
onClose in interface org.gcube.rest.commons.resourceawareservice.ResourceAwareServiceAPI<T extends org.gcube.rest.commons.resourceawareservice.resources.StatefulResource>public void startService()
startService in interface org.gcube.rest.commons.resourceawareservice.ResourceAwareServiceAPI<T extends org.gcube.rest.commons.resourceawareservice.resources.StatefulResource>public void closeService()
closeService in interface org.gcube.rest.commons.resourceawareservice.ResourceAwareServiceAPI<T extends org.gcube.rest.commons.resourceawareservice.resources.StatefulResource>public abstract String getScope()
public abstract String getResourceClass()
public abstract String getResourceNamePref()
public List<T> getAllResources()
getAllResources in interface org.gcube.rest.commons.resourceawareservice.ResourceAwareServiceAPI<T extends org.gcube.rest.commons.resourceawareservice.resources.StatefulResource>public List<T> getResourcesByFilter(String filterString)
getResourcesByFilter in interface org.gcube.rest.commons.resourceawareservice.ResourceAwareServiceAPI<T extends org.gcube.rest.commons.resourceawareservice.resources.StatefulResource>Copyright © 2018. All Rights Reserved.