2016-11-25 15:42:29 +01:00
|
|
|
package org.gcube.smartgears.provider;
|
|
|
|
|
2022-05-25 18:56:42 +02:00
|
|
|
import java.util.List;
|
|
|
|
|
2016-11-25 15:42:29 +01:00
|
|
|
import javax.servlet.ServletContext;
|
|
|
|
|
|
|
|
import org.gcube.smartgears.configuration.application.ApplicationExtensions;
|
|
|
|
import org.gcube.smartgears.configuration.application.ApplicationHandlers;
|
|
|
|
import org.gcube.smartgears.configuration.library.SmartGearsConfiguration;
|
|
|
|
import org.gcube.smartgears.context.application.ApplicationContext;
|
|
|
|
import org.gcube.smartgears.context.container.ContainerContext;
|
2022-05-25 18:56:42 +02:00
|
|
|
import org.gcube.smartgears.handlers.container.ContainerHandler;
|
2022-06-10 17:08:44 +02:00
|
|
|
import org.gcube.smartgears.publishing.Publisher;
|
2022-03-17 17:17:15 +01:00
|
|
|
import org.gcube.smartgears.security.AuthorizationProvider;
|
2016-11-25 15:42:29 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Provides dependencies for container and application management.
|
|
|
|
*
|
|
|
|
* @author Fabio Simeoni
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public interface Provider {
|
|
|
|
|
|
|
|
//container-level dependencies
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the runtime properties.
|
|
|
|
* @return the properties.
|
|
|
|
*/
|
|
|
|
SmartGearsConfiguration smartgearsConfiguration();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Assembles and returns the context of the container.
|
|
|
|
* @return the container's context
|
|
|
|
*/
|
|
|
|
ContainerContext containerContext();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the handlers associated with the container.
|
|
|
|
* @return the handlers
|
|
|
|
*/
|
2022-05-25 18:56:42 +02:00
|
|
|
List<ContainerHandler> containerHandlers();
|
2016-11-25 15:42:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns an implementation of the IS publisher for the container
|
|
|
|
* @return the publisher implementation
|
|
|
|
*/
|
2022-06-10 17:08:44 +02:00
|
|
|
List<Publisher> publishers();
|
2016-11-25 15:42:29 +01:00
|
|
|
|
|
|
|
//application-level dependencies
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Assembles and returns the context of a given application.
|
|
|
|
* @param container the context of the container
|
|
|
|
* @param application the servlet context of the application
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
|
|
|
|
ApplicationContext contextFor(ContainerContext container,ServletContext application);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the handlers associated with a given application.
|
|
|
|
* @param application the context of the application
|
|
|
|
* @return the handlers
|
|
|
|
*/
|
|
|
|
ApplicationHandlers handlersFor(ApplicationContext application);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the API extensions associated with a given application.
|
|
|
|
* @param application the context of the application
|
|
|
|
* @return the extensions
|
|
|
|
*/
|
|
|
|
ApplicationExtensions extensionsFor(ApplicationContext application);
|
2022-03-21 11:17:07 +01:00
|
|
|
|
2016-11-25 15:42:29 +01:00
|
|
|
/**
|
2022-03-21 11:17:07 +01:00
|
|
|
* Returns the authorization provider for this node
|
|
|
|
* @return the AuthorizationProvider implementation
|
2016-11-25 15:42:29 +01:00
|
|
|
*/
|
2022-03-21 11:17:07 +01:00
|
|
|
AuthorizationProvider authorizationProvider();
|
2016-11-25 15:42:29 +01:00
|
|
|
|
|
|
|
}
|