changed publisher interface
This commit is contained in:
parent
710e8ef242
commit
58bb6a28e4
|
@ -120,8 +120,7 @@ public class ApplicationProfileManager extends ApplicationLifecycleHandler {
|
||||||
//(we may well have failed there)
|
//(we may well have failed there)
|
||||||
for (Publisher publisher: publishers)
|
for (Publisher publisher: publishers)
|
||||||
try {
|
try {
|
||||||
publisher.publishApplication(context,
|
publisher.update(context);
|
||||||
context.container().configuration().authorizationProvider().getContexts());
|
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
|
||||||
log.error("cannot publish {} with publisher type {} (see details)",context.name(), publisher.getClass().getCanonicalName(), e);
|
log.error("cannot publish {} with publisher type {} (see details)",context.name(), publisher.getClass().getCanonicalName(), e);
|
||||||
|
@ -140,7 +139,7 @@ public class ApplicationProfileManager extends ApplicationLifecycleHandler {
|
||||||
for (Publisher publisher: publishers)
|
for (Publisher publisher: publishers)
|
||||||
try {
|
try {
|
||||||
log.debug("publishing application in context {}", scope);
|
log.debug("publishing application in context {}", scope);
|
||||||
publisher.publishApplication(context,
|
publisher.create(context,
|
||||||
Collections.singleton(scope));
|
Collections.singleton(scope));
|
||||||
|
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
@ -161,7 +160,7 @@ public class ApplicationProfileManager extends ApplicationLifecycleHandler {
|
||||||
for (Publisher publisher: publishers)
|
for (Publisher publisher: publishers)
|
||||||
try {
|
try {
|
||||||
log.debug("unpublishing application from scope {}", scope);
|
log.debug("unpublishing application from scope {}", scope);
|
||||||
publisher.unpublishApplication(context,
|
publisher.remove(context,
|
||||||
Collections.singleton(scope));
|
Collections.singleton(scope));
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
|
||||||
|
|
|
@ -104,8 +104,7 @@ public class ContainerProfileManager extends ContainerHandler {
|
||||||
//(we may well have failed there)
|
//(we may well have failed there)
|
||||||
for (Publisher publisher: publishers)
|
for (Publisher publisher: publishers)
|
||||||
try {
|
try {
|
||||||
publisher.publishContainer(context,
|
publisher.update(context);
|
||||||
context.configuration().authorizationProvider().getContexts());
|
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
|
||||||
log.error("cannot publish containar with publisher type {} (see details)", publisher.getClass().getCanonicalName(), e);
|
log.error("cannot publish containar with publisher type {} (see details)", publisher.getClass().getCanonicalName(), e);
|
||||||
|
@ -123,7 +122,7 @@ public class ContainerProfileManager extends ContainerHandler {
|
||||||
for (Publisher publisher: publishers)
|
for (Publisher publisher: publishers)
|
||||||
try {
|
try {
|
||||||
log.trace("publishing container within new scope");
|
log.trace("publishing container within new scope");
|
||||||
publisher.publishContainer(context,
|
publisher.create(context,
|
||||||
Collections.singleton(scope));
|
Collections.singleton(scope));
|
||||||
|
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
@ -144,7 +143,7 @@ public class ContainerProfileManager extends ContainerHandler {
|
||||||
for (Publisher publisher: publishers)
|
for (Publisher publisher: publishers)
|
||||||
try {
|
try {
|
||||||
log.trace("unpublishing container from context {}", scope);
|
log.trace("unpublishing container from context {}", scope);
|
||||||
publisher.unpublishContainer(context,
|
publisher.remove(context,
|
||||||
Collections.singleton(scope));
|
Collections.singleton(scope));
|
||||||
|
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
|
|
@ -7,11 +7,15 @@ import org.gcube.smartgears.context.container.ContainerContext;
|
||||||
|
|
||||||
public interface Publisher {
|
public interface Publisher {
|
||||||
|
|
||||||
boolean publishContainer(ContainerContext container, Set<String> contexts);
|
boolean create(ContainerContext container, Set<String> contexts);
|
||||||
|
|
||||||
boolean publishApplication(ApplicationContext application, Set<String> contexts);
|
boolean create(ApplicationContext application, Set<String> contexts);
|
||||||
|
|
||||||
boolean unpublishContainer(ContainerContext container, Set<String> contexts);
|
boolean update(ApplicationContext application);
|
||||||
|
|
||||||
boolean unpublishApplication(ApplicationContext application, Set<String> contexts);
|
boolean update(ContainerContext container);
|
||||||
|
|
||||||
|
boolean remove(ApplicationContext application, Set<String> contexts);
|
||||||
|
|
||||||
|
boolean remove(ContainerContext application, Set<String> contexts);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue