Class GreeterPlugin

java.lang.Object
org.gcube.service.helloworld.plugin.greeter.GreeterPlugin
All Implemented Interfaces:
org.gcube.service.helloworld.plugin.HelloWorldPlugin, org.gcube.smartgears.plugins.ServicePlugin

public class GreeterPlugin extends Object implements org.gcube.service.helloworld.plugin.HelloWorldPlugin, org.gcube.smartgears.plugins.ServicePlugin
A plugin that greets whoever calls it. It implements ServicePlugin to say what differs from its service (it needs no token and answers at /plugins/greeter) and to receive its configuration, hello-world-greeter-plugin.yaml: the word it greets with, greeting. Its name, version and description come from the Maven packaging of its jar, its Contexts are the ones of its service.
Author:
Luca Frosini (ISTI-CNR)
  • Field Details

    • ID

      public static final String ID
      The identifier of the plugin.
      See Also:
    • GREETING

      public static final String GREETING
      The key of the configuration giving the word the plugin greets with.
      See Also:
    • DEFAULT_GREETING

      public static final String DEFAULT_GREETING
      The word the plugin greets with when its configuration gives none.
      See Also:
  • Constructor Details

    • GreeterPlugin

      public GreeterPlugin()
  • Method Details

    • configure

      public void configure(Map<String,Object> configuration)
      Specified by:
      configure in interface org.gcube.smartgears.plugins.ServicePlugin
    • id

      public String id()
      Specified by:
      id in interface org.gcube.service.helloworld.plugin.HelloWorldPlugin
    • greet

      public String greet(String who)
      Specified by:
      greet in interface org.gcube.service.helloworld.plugin.HelloWorldPlugin
    • authenticated

      public boolean authenticated()
      Specified by:
      authenticated in interface org.gcube.smartgears.plugins.ServicePlugin
    • path

      public Optional<String> path()
      Specified by:
      path in interface org.gcube.smartgears.plugins.ServicePlugin