InnerMethod for accountign added

master
lucio 4 years ago
parent 134e46749f
commit 3cf1e7999f

@ -15,11 +15,7 @@
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
@ -30,7 +26,6 @@
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>

@ -3,6 +3,9 @@ org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=1.8

@ -10,7 +10,7 @@
<groupId>org.gcube.data.spd</groupId>
<artifactId>species-products-discovery</artifactId>
<version>3.1.0-SNAPSHOT</version>
<version>3.1.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>species product discovery</name>

@ -47,6 +47,7 @@ import org.gcube.data.streams.delegates.PipedStream;
import org.gcube.smartgears.ApplicationManagerProvider;
import org.gcube.smartgears.ContextProvider;
import org.gcube.smartgears.context.application.ApplicationContext;
import org.gcube.smartgears.utils.InnerMethodName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -63,6 +64,7 @@ public class Classification {
@Path("children/{key}")
public Response retrieveTaxonChildrenByTaxonId(@PathParam("key") String key) throws UnsupportedPluginException,UnsupportedCapabilityException, InvalidIdentifierException {
try{
InnerMethodName.instance.set("retrieveTaxonChildrenByTaxonId");
logger.trace("calling get taxon childs by id");
PluginManager manager = initializer.getPluginManager();
String pluginName = Util.getProviderFromKey(key);
@ -112,7 +114,7 @@ public class Classification {
@Path("tree/{key}")
public Response retrieveChildrenTreeById(@PathParam("key") final String key) throws UnsupportedPluginException,UnsupportedCapabilityException, InvalidIdentifierException{
PluginManager manager = initializer.getPluginManager();
InnerMethodName.instance.set("retrieveChildrenTreeById");
try{
String pluginName = Util.getProviderFromKey(key);
final String id = Util.getIdFromKey(key);
@ -162,6 +164,7 @@ public class Classification {
@GET
@Path("synonyms/{key}")
public Response retrieveSynonymsById(@PathParam("key") String key) throws UnsupportedPluginException,UnsupportedCapabilityException, InvalidIdentifierException{
InnerMethodName.instance.set("retrieveSynonymsById");
try{
PluginManager manager = initializer.getPluginManager();
String pluginName = Util.getProviderFromKey(key);

@ -40,6 +40,7 @@ import org.gcube.data.spd.utils.ExecutorsContainer;
import org.gcube.smartgears.ApplicationManagerProvider;
import org.gcube.smartgears.ContextProvider;
import org.gcube.smartgears.context.application.ApplicationContext;
import org.gcube.smartgears.utils.InnerMethodName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -57,6 +58,7 @@ public class Executor {
@GET
@Path("result/{jobKey}")
public String getResultLink(@PathParam("jobKey") String jobKey) throws InvalidIdentifierException {
InnerMethodName.instance.set("getJobResultLink");
String node;
String jobId;
try{
@ -82,7 +84,7 @@ public class Executor {
@GET
@Path("error/{jobKey}")
public String getErrorLink(@PathParam("jobKey") String jobKey) throws InvalidIdentifierException {
InnerMethodName.instance.set("getJobErrorLink");
String node;
String jobId;
@ -109,6 +111,7 @@ public class Executor {
@GET
@Path("status/{jobKey}")
public CompleteJobStatus getStatus(@PathParam("jobKey") String jobKey) throws InvalidIdentifierException {
InnerMethodName.instance.set("getJobStatus");
logger.trace("[TEST] job status called with id {}", jobKey);
String node;
String jobId;
@ -159,6 +162,7 @@ public class Executor {
@DELETE
@Path("{jobKey}")
public void removeJob(@PathParam("jobKey") String jobId) throws InvalidIdentifierException {
InnerMethodName.instance.set("removeJob");
if (!initializer.getJobMap().containsKey(jobId)) throw new InvalidIdentifierException(jobId);
initializer.getJobMap().remove(jobId);
}
@ -169,6 +173,7 @@ public class Executor {
@Consumes(MediaType.APPLICATION_XML)
@Produces(MediaType.APPLICATION_XML)
public SubmitJobResponse submitJob(SubmitJob request) throws InvalidJobException {
InnerMethodName.instance.set("submitJob");
PluginManager pluginManger = initializer.getPluginManager();
SpeciesJob job = null;
switch (request.getJob()) {

@ -55,6 +55,7 @@ import org.gcube.smartgears.ApplicationManagerProvider;
import org.gcube.smartgears.ContextProvider;
import org.gcube.smartgears.annotations.ManagedBy;
import org.gcube.smartgears.context.application.ApplicationContext;
import org.gcube.smartgears.utils.InnerMethodName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -77,7 +78,7 @@ public class Manager {
@GET
@Path("search")
public Response search(@QueryParam("query") String query) throws QueryNotValidException, UnsupportedPluginException, UnsupportedCapabilityException {
InnerMethodName.instance.set("search");
Query result;
logger.trace("submitted query is "+query);
try{
@ -213,6 +214,7 @@ public class Manager {
@Path("providers")
@Produces(MediaType.APPLICATION_XML)
public PluginDescriptions getSupportedPlugins(){
InnerMethodName.instance.set("getSupportedPlugins");
logger.trace("calling providers method");
PluginManager pluginManager = initializer.getPluginManager();
List<PluginDescription> descriptions = new ArrayList<PluginDescription>();

@ -40,6 +40,7 @@ import org.gcube.data.streams.Stream;
import org.gcube.smartgears.ApplicationManagerProvider;
import org.gcube.smartgears.ContextProvider;
import org.gcube.smartgears.context.application.ApplicationContext;
import org.gcube.smartgears.utils.InnerMethodName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -61,6 +62,7 @@ public class Occurrences{
@GET
@Path("keys")
public Response getByKeys() {
InnerMethodName.instance.set("getOccurrencesByKey");
try{
String inputLocatorId = UUID.randomUUID().toString();
@ -98,6 +100,7 @@ public class Occurrences{
@GET
@Path("ids")
public Response getByIds(){
InnerMethodName.instance.set("getOccurrencesByIds");
try{
String inputLocatorId = UUID.randomUUID().toString();

@ -15,6 +15,7 @@ import org.gcube.data.spd.model.util.SerializableList;
import org.gcube.data.spd.utils.DynamicList;
import org.gcube.data.spd.utils.DynamicMap;
import org.gcube.data.spd.utils.ResultWrapperMantainer;
import org.gcube.smartgears.utils.InnerMethodName;
import org.glassfish.jersey.server.ChunkedOutput;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -29,6 +30,7 @@ public class ResultSetEndpoint {
@Produces(MediaType.TEXT_XML)
@Path("{locator}")
public ChunkedOutput<String> get(@PathParam("locator") String locator){
InnerMethodName.instance.set("getLocator");
logger.info("requesting locator {} ",locator);
return ResultWrapperMantainer.getWriterById(locator).getOutput();
}
@ -37,6 +39,7 @@ public class ResultSetEndpoint {
@Produces(MediaType.TEXT_XML)
@Path("{locator}")
public void close(@PathParam("locator") String locator){
InnerMethodName.instance.set("deleteLocator");
logger.info("removing locator {} ",locator);
ResultWrapperMantainer.remove(locator);
}
@ -45,6 +48,7 @@ public class ResultSetEndpoint {
@Consumes(MediaType.APPLICATION_XML)
@Path("{locator}")
public boolean sendInput(@PathParam("locator") String id, SerializableList<String> input) throws InvalidIdentifierException {
InnerMethodName.instance.set("createLocator");
//String node;
DynamicList list = DynamicMap.get(id);
if (list==null){

Loading…
Cancel
Save