2022-06-08 17:42:32 +02:00
|
|
|
package org.gcube.smartgears.publishing;
|
|
|
|
|
2022-06-10 17:08:44 +02:00
|
|
|
import java.util.Set;
|
|
|
|
|
|
|
|
import org.gcube.smartgears.context.application.ApplicationContext;
|
|
|
|
import org.gcube.smartgears.context.container.ContainerContext;
|
2022-06-08 17:42:32 +02:00
|
|
|
|
|
|
|
public interface Publisher {
|
|
|
|
|
2022-06-28 16:18:02 +02:00
|
|
|
/**
|
|
|
|
* creates the container resource in the context
|
|
|
|
*
|
|
|
|
* @param container
|
|
|
|
* @param contexts the new contexts where the resource must be created
|
|
|
|
* @return
|
|
|
|
*/
|
2022-06-28 13:28:16 +02:00
|
|
|
boolean create(ContainerContext container, Set<String> contexts);
|
2022-06-08 17:42:32 +02:00
|
|
|
|
2022-06-28 16:18:02 +02:00
|
|
|
/**
|
|
|
|
* creates the application resource in the contexts
|
|
|
|
*
|
|
|
|
* @param application
|
|
|
|
* @param contexts the new contexts where the resource must be created
|
|
|
|
* @return
|
|
|
|
*/
|
2022-06-28 13:28:16 +02:00
|
|
|
boolean create(ApplicationContext application, Set<String> contexts);
|
2022-06-08 17:42:32 +02:00
|
|
|
|
2022-06-28 16:18:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* updates the application resource
|
|
|
|
*
|
|
|
|
* @param application
|
|
|
|
* @return
|
|
|
|
*/
|
2022-06-28 13:28:16 +02:00
|
|
|
boolean update(ApplicationContext application);
|
2022-06-08 17:42:32 +02:00
|
|
|
|
2022-06-28 16:18:02 +02:00
|
|
|
/**
|
|
|
|
* updates the container resource
|
|
|
|
*
|
|
|
|
* @param container
|
|
|
|
* @return
|
|
|
|
*/
|
2022-06-28 13:28:16 +02:00
|
|
|
boolean update(ContainerContext container);
|
|
|
|
|
2022-06-28 16:18:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* removes the application resource from the contexts
|
|
|
|
*
|
|
|
|
* @param application
|
|
|
|
* @param contexts the contexts from where the resource must be removed
|
|
|
|
* @return
|
|
|
|
*/
|
2022-06-28 13:28:16 +02:00
|
|
|
boolean remove(ApplicationContext application, Set<String> contexts);
|
|
|
|
|
2022-06-28 16:18:02 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* removes the container resource from the contexts
|
|
|
|
* @param application
|
|
|
|
* @param contexts the contexts from where the resource must be removed
|
|
|
|
* @return
|
|
|
|
*/
|
2022-06-28 13:28:16 +02:00
|
|
|
boolean remove(ContainerContext application, Set<String> contexts);
|
2022-06-08 17:42:32 +02:00
|
|
|
}
|