78 lines
2.1 KiB
Java
78 lines
2.1 KiB
Java
package org.gcube.smartgears.provider;
|
|
|
|
import java.util.List;
|
|
|
|
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;
|
|
import org.gcube.smartgears.handlers.container.ContainerHandler;
|
|
import org.gcube.smartgears.publishing.Publisher;
|
|
import org.gcube.smartgears.security.AuthorizationProvider;
|
|
|
|
/**
|
|
* 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
|
|
*/
|
|
List<ContainerHandler> containerHandlers();
|
|
|
|
|
|
/**
|
|
* Returns an implementation of the IS publisher for the container
|
|
* @return the publisher implementation
|
|
*/
|
|
List<Publisher> publishers();
|
|
|
|
//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);
|
|
|
|
|
|
}
|