InnerMethod for accountign added
This commit is contained in:
parent
134e46749f
commit
3cf1e7999f
|
@ -15,11 +15,7 @@
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="optional" value="true"/>
|
<attribute name="optional" value="true"/>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
</attributes>
|
<attribute name="test" value="true"/>
|
||||||
</classpathentry>
|
|
||||||
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
|
|
||||||
<attributes>
|
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8">
|
<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">
|
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="maven.pomderived" value="true"/>
|
<attribute name="maven.pomderived" value="true"/>
|
||||||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
|
|
||||||
</attributes>
|
</attributes>
|
||||||
</classpathentry>
|
</classpathentry>
|
||||||
<classpathentry kind="output" path="target/classes"/>
|
<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.codegen.targetPlatform=1.8
|
||||||
org.eclipse.jdt.core.compiler.compliance=1.8
|
org.eclipse.jdt.core.compiler.compliance=1.8
|
||||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
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.enumIdentifier=error
|
||||||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
|
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
|
org.eclipse.jdt.core.compiler.source=1.8
|
||||||
|
|
2
pom.xml
2
pom.xml
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
<groupId>org.gcube.data.spd</groupId>
|
<groupId>org.gcube.data.spd</groupId>
|
||||||
<artifactId>species-products-discovery</artifactId>
|
<artifactId>species-products-discovery</artifactId>
|
||||||
<version>3.1.0-SNAPSHOT</version>
|
<version>3.1.1-SNAPSHOT</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
<name>species product discovery</name>
|
<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.ApplicationManagerProvider;
|
||||||
import org.gcube.smartgears.ContextProvider;
|
import org.gcube.smartgears.ContextProvider;
|
||||||
import org.gcube.smartgears.context.application.ApplicationContext;
|
import org.gcube.smartgears.context.application.ApplicationContext;
|
||||||
|
import org.gcube.smartgears.utils.InnerMethodName;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -63,6 +64,7 @@ public class Classification {
|
||||||
@Path("children/{key}")
|
@Path("children/{key}")
|
||||||
public Response retrieveTaxonChildrenByTaxonId(@PathParam("key") String key) throws UnsupportedPluginException,UnsupportedCapabilityException, InvalidIdentifierException {
|
public Response retrieveTaxonChildrenByTaxonId(@PathParam("key") String key) throws UnsupportedPluginException,UnsupportedCapabilityException, InvalidIdentifierException {
|
||||||
try{
|
try{
|
||||||
|
InnerMethodName.instance.set("retrieveTaxonChildrenByTaxonId");
|
||||||
logger.trace("calling get taxon childs by id");
|
logger.trace("calling get taxon childs by id");
|
||||||
PluginManager manager = initializer.getPluginManager();
|
PluginManager manager = initializer.getPluginManager();
|
||||||
String pluginName = Util.getProviderFromKey(key);
|
String pluginName = Util.getProviderFromKey(key);
|
||||||
|
@ -112,7 +114,7 @@ public class Classification {
|
||||||
@Path("tree/{key}")
|
@Path("tree/{key}")
|
||||||
public Response retrieveChildrenTreeById(@PathParam("key") final String key) throws UnsupportedPluginException,UnsupportedCapabilityException, InvalidIdentifierException{
|
public Response retrieveChildrenTreeById(@PathParam("key") final String key) throws UnsupportedPluginException,UnsupportedCapabilityException, InvalidIdentifierException{
|
||||||
PluginManager manager = initializer.getPluginManager();
|
PluginManager manager = initializer.getPluginManager();
|
||||||
|
InnerMethodName.instance.set("retrieveChildrenTreeById");
|
||||||
try{
|
try{
|
||||||
String pluginName = Util.getProviderFromKey(key);
|
String pluginName = Util.getProviderFromKey(key);
|
||||||
final String id = Util.getIdFromKey(key);
|
final String id = Util.getIdFromKey(key);
|
||||||
|
@ -162,6 +164,7 @@ public class Classification {
|
||||||
@GET
|
@GET
|
||||||
@Path("synonyms/{key}")
|
@Path("synonyms/{key}")
|
||||||
public Response retrieveSynonymsById(@PathParam("key") String key) throws UnsupportedPluginException,UnsupportedCapabilityException, InvalidIdentifierException{
|
public Response retrieveSynonymsById(@PathParam("key") String key) throws UnsupportedPluginException,UnsupportedCapabilityException, InvalidIdentifierException{
|
||||||
|
InnerMethodName.instance.set("retrieveSynonymsById");
|
||||||
try{
|
try{
|
||||||
PluginManager manager = initializer.getPluginManager();
|
PluginManager manager = initializer.getPluginManager();
|
||||||
String pluginName = Util.getProviderFromKey(key);
|
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.ApplicationManagerProvider;
|
||||||
import org.gcube.smartgears.ContextProvider;
|
import org.gcube.smartgears.ContextProvider;
|
||||||
import org.gcube.smartgears.context.application.ApplicationContext;
|
import org.gcube.smartgears.context.application.ApplicationContext;
|
||||||
|
import org.gcube.smartgears.utils.InnerMethodName;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -57,6 +58,7 @@ public class Executor {
|
||||||
@GET
|
@GET
|
||||||
@Path("result/{jobKey}")
|
@Path("result/{jobKey}")
|
||||||
public String getResultLink(@PathParam("jobKey") String jobKey) throws InvalidIdentifierException {
|
public String getResultLink(@PathParam("jobKey") String jobKey) throws InvalidIdentifierException {
|
||||||
|
InnerMethodName.instance.set("getJobResultLink");
|
||||||
String node;
|
String node;
|
||||||
String jobId;
|
String jobId;
|
||||||
try{
|
try{
|
||||||
|
@ -82,7 +84,7 @@ public class Executor {
|
||||||
@GET
|
@GET
|
||||||
@Path("error/{jobKey}")
|
@Path("error/{jobKey}")
|
||||||
public String getErrorLink(@PathParam("jobKey") String jobKey) throws InvalidIdentifierException {
|
public String getErrorLink(@PathParam("jobKey") String jobKey) throws InvalidIdentifierException {
|
||||||
|
InnerMethodName.instance.set("getJobErrorLink");
|
||||||
String node;
|
String node;
|
||||||
String jobId;
|
String jobId;
|
||||||
|
|
||||||
|
@ -109,6 +111,7 @@ public class Executor {
|
||||||
@GET
|
@GET
|
||||||
@Path("status/{jobKey}")
|
@Path("status/{jobKey}")
|
||||||
public CompleteJobStatus getStatus(@PathParam("jobKey") String jobKey) throws InvalidIdentifierException {
|
public CompleteJobStatus getStatus(@PathParam("jobKey") String jobKey) throws InvalidIdentifierException {
|
||||||
|
InnerMethodName.instance.set("getJobStatus");
|
||||||
logger.trace("[TEST] job status called with id {}", jobKey);
|
logger.trace("[TEST] job status called with id {}", jobKey);
|
||||||
String node;
|
String node;
|
||||||
String jobId;
|
String jobId;
|
||||||
|
@ -159,6 +162,7 @@ public class Executor {
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("{jobKey}")
|
@Path("{jobKey}")
|
||||||
public void removeJob(@PathParam("jobKey") String jobId) throws InvalidIdentifierException {
|
public void removeJob(@PathParam("jobKey") String jobId) throws InvalidIdentifierException {
|
||||||
|
InnerMethodName.instance.set("removeJob");
|
||||||
if (!initializer.getJobMap().containsKey(jobId)) throw new InvalidIdentifierException(jobId);
|
if (!initializer.getJobMap().containsKey(jobId)) throw new InvalidIdentifierException(jobId);
|
||||||
initializer.getJobMap().remove(jobId);
|
initializer.getJobMap().remove(jobId);
|
||||||
}
|
}
|
||||||
|
@ -169,6 +173,7 @@ public class Executor {
|
||||||
@Consumes(MediaType.APPLICATION_XML)
|
@Consumes(MediaType.APPLICATION_XML)
|
||||||
@Produces(MediaType.APPLICATION_XML)
|
@Produces(MediaType.APPLICATION_XML)
|
||||||
public SubmitJobResponse submitJob(SubmitJob request) throws InvalidJobException {
|
public SubmitJobResponse submitJob(SubmitJob request) throws InvalidJobException {
|
||||||
|
InnerMethodName.instance.set("submitJob");
|
||||||
PluginManager pluginManger = initializer.getPluginManager();
|
PluginManager pluginManger = initializer.getPluginManager();
|
||||||
SpeciesJob job = null;
|
SpeciesJob job = null;
|
||||||
switch (request.getJob()) {
|
switch (request.getJob()) {
|
||||||
|
|
|
@ -55,6 +55,7 @@ import org.gcube.smartgears.ApplicationManagerProvider;
|
||||||
import org.gcube.smartgears.ContextProvider;
|
import org.gcube.smartgears.ContextProvider;
|
||||||
import org.gcube.smartgears.annotations.ManagedBy;
|
import org.gcube.smartgears.annotations.ManagedBy;
|
||||||
import org.gcube.smartgears.context.application.ApplicationContext;
|
import org.gcube.smartgears.context.application.ApplicationContext;
|
||||||
|
import org.gcube.smartgears.utils.InnerMethodName;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -77,7 +78,7 @@ public class Manager {
|
||||||
@GET
|
@GET
|
||||||
@Path("search")
|
@Path("search")
|
||||||
public Response search(@QueryParam("query") String query) throws QueryNotValidException, UnsupportedPluginException, UnsupportedCapabilityException {
|
public Response search(@QueryParam("query") String query) throws QueryNotValidException, UnsupportedPluginException, UnsupportedCapabilityException {
|
||||||
|
InnerMethodName.instance.set("search");
|
||||||
Query result;
|
Query result;
|
||||||
logger.trace("submitted query is "+query);
|
logger.trace("submitted query is "+query);
|
||||||
try{
|
try{
|
||||||
|
@ -213,6 +214,7 @@ public class Manager {
|
||||||
@Path("providers")
|
@Path("providers")
|
||||||
@Produces(MediaType.APPLICATION_XML)
|
@Produces(MediaType.APPLICATION_XML)
|
||||||
public PluginDescriptions getSupportedPlugins(){
|
public PluginDescriptions getSupportedPlugins(){
|
||||||
|
InnerMethodName.instance.set("getSupportedPlugins");
|
||||||
logger.trace("calling providers method");
|
logger.trace("calling providers method");
|
||||||
PluginManager pluginManager = initializer.getPluginManager();
|
PluginManager pluginManager = initializer.getPluginManager();
|
||||||
List<PluginDescription> descriptions = new ArrayList<PluginDescription>();
|
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.ApplicationManagerProvider;
|
||||||
import org.gcube.smartgears.ContextProvider;
|
import org.gcube.smartgears.ContextProvider;
|
||||||
import org.gcube.smartgears.context.application.ApplicationContext;
|
import org.gcube.smartgears.context.application.ApplicationContext;
|
||||||
|
import org.gcube.smartgears.utils.InnerMethodName;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
@ -61,6 +62,7 @@ public class Occurrences{
|
||||||
@GET
|
@GET
|
||||||
@Path("keys")
|
@Path("keys")
|
||||||
public Response getByKeys() {
|
public Response getByKeys() {
|
||||||
|
InnerMethodName.instance.set("getOccurrencesByKey");
|
||||||
try{
|
try{
|
||||||
|
|
||||||
String inputLocatorId = UUID.randomUUID().toString();
|
String inputLocatorId = UUID.randomUUID().toString();
|
||||||
|
@ -98,6 +100,7 @@ public class Occurrences{
|
||||||
@GET
|
@GET
|
||||||
@Path("ids")
|
@Path("ids")
|
||||||
public Response getByIds(){
|
public Response getByIds(){
|
||||||
|
InnerMethodName.instance.set("getOccurrencesByIds");
|
||||||
try{
|
try{
|
||||||
|
|
||||||
String inputLocatorId = UUID.randomUUID().toString();
|
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.DynamicList;
|
||||||
import org.gcube.data.spd.utils.DynamicMap;
|
import org.gcube.data.spd.utils.DynamicMap;
|
||||||
import org.gcube.data.spd.utils.ResultWrapperMantainer;
|
import org.gcube.data.spd.utils.ResultWrapperMantainer;
|
||||||
|
import org.gcube.smartgears.utils.InnerMethodName;
|
||||||
import org.glassfish.jersey.server.ChunkedOutput;
|
import org.glassfish.jersey.server.ChunkedOutput;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
@ -29,6 +30,7 @@ public class ResultSetEndpoint {
|
||||||
@Produces(MediaType.TEXT_XML)
|
@Produces(MediaType.TEXT_XML)
|
||||||
@Path("{locator}")
|
@Path("{locator}")
|
||||||
public ChunkedOutput<String> get(@PathParam("locator") String locator){
|
public ChunkedOutput<String> get(@PathParam("locator") String locator){
|
||||||
|
InnerMethodName.instance.set("getLocator");
|
||||||
logger.info("requesting locator {} ",locator);
|
logger.info("requesting locator {} ",locator);
|
||||||
return ResultWrapperMantainer.getWriterById(locator).getOutput();
|
return ResultWrapperMantainer.getWriterById(locator).getOutput();
|
||||||
}
|
}
|
||||||
|
@ -37,6 +39,7 @@ public class ResultSetEndpoint {
|
||||||
@Produces(MediaType.TEXT_XML)
|
@Produces(MediaType.TEXT_XML)
|
||||||
@Path("{locator}")
|
@Path("{locator}")
|
||||||
public void close(@PathParam("locator") String locator){
|
public void close(@PathParam("locator") String locator){
|
||||||
|
InnerMethodName.instance.set("deleteLocator");
|
||||||
logger.info("removing locator {} ",locator);
|
logger.info("removing locator {} ",locator);
|
||||||
ResultWrapperMantainer.remove(locator);
|
ResultWrapperMantainer.remove(locator);
|
||||||
}
|
}
|
||||||
|
@ -45,6 +48,7 @@ public class ResultSetEndpoint {
|
||||||
@Consumes(MediaType.APPLICATION_XML)
|
@Consumes(MediaType.APPLICATION_XML)
|
||||||
@Path("{locator}")
|
@Path("{locator}")
|
||||||
public boolean sendInput(@PathParam("locator") String id, SerializableList<String> input) throws InvalidIdentifierException {
|
public boolean sendInput(@PathParam("locator") String id, SerializableList<String> input) throws InvalidIdentifierException {
|
||||||
|
InnerMethodName.instance.set("createLocator");
|
||||||
//String node;
|
//String node;
|
||||||
DynamicList list = DynamicMap.get(id);
|
DynamicList list = DynamicMap.get(id);
|
||||||
if (list==null){
|
if (list==null){
|
||||||
|
|
Reference in New Issue