Commit f1b87474 authored by Francesco Chicchiricco's avatar Francesco Chicchiricco
Browse files

Missing bits

parent dbb47cb6
......@@ -31,6 +31,12 @@ public final class ChorevolutionEntitlement {
public static final String CHOREOGRAPHY_DELETE = "CHOREOGRAPHY_DELETE";
public static final String NOTIFY_COMPLETION = "NOTIFY_COMPLETION";
public static final String ON_CHOREOGRAPHY = "ON_CHOREOGRAPHY";
public static final String ON_CHOREOGRAPHY_SERVICE = "ON_CHOREOGRAPHY_SERVICE";
private static final Set<String> VALUES;
static {
......
......@@ -16,8 +16,12 @@
package org.apache.syncope.core.logic;
import eu.chorevolution.idm.common.ChorevolutionEntitlement;
import eu.chorevolution.idm.common.types.ChoreographyAction;
import eu.chorevolution.idm.common.types.ChoreographyOperation;
import eu.chorevolution.idm.common.types.ServiceAction;
import java.io.InputStream;
import java.lang.reflect.Method;
import org.apache.commons.lang3.StringUtils;
import org.apache.syncope.common.lib.AbstractBaseBean;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Component;
......@@ -26,15 +30,38 @@ import org.springframework.stereotype.Component;
public class ChoreographyLogic extends AbstractTransactionalLogic<AbstractBaseBean> {
@PreAuthorize("hasRole('" + ChorevolutionEntitlement.CHOREOGRAPHY_CREATE + "')")
public void create(final String id, final InputStream in) {
public String enact(final String enactmentEngineKey, final InputStream chorSpec) {
return StringUtils.EMPTY;
}
@PreAuthorize("hasRole('" + ChorevolutionEntitlement.CHOREOGRAPHY_UPDATE + "')")
public void update(final String id, final InputStream in) {
public void enact(final String id, final String enactmentEngineKey, final InputStream chorSpec) {
}
@PreAuthorize("hasRole('" + ChorevolutionEntitlement.CHOREOGRAPHY_DELETE + "')")
public void delete(final String id) {
public void delete(final String id, final String enactmentEngineKey) {
}
@PreAuthorize("hasRole('" + ChorevolutionEntitlement.NOTIFY_COMPLETION + "')")
public void notifyCompletion(
final String id,
final ChoreographyOperation operation,
final String message,
final InputStream enactedChorSpec) {
}
@PreAuthorize("hasRole('" + ChorevolutionEntitlement.ON_CHOREOGRAPHY + "')")
public void onChoreography(final String id, final ChoreographyAction action, final Integer newSize) {
}
@PreAuthorize("hasRole('" + ChorevolutionEntitlement.ON_CHOREOGRAPHY_SERVICE + "')")
public void onChoreographyService(
final String id,
final String serviceId,
final ServiceAction action,
final String newServiceURL) {
}
@Override
......
......@@ -16,6 +16,7 @@
package org.apache.syncope.core.rest.cxf.service;
import eu.chorevolution.idm.common.types.ChoreographyAction;
import eu.chorevolution.idm.common.types.ChoreographyOperation;
import eu.chorevolution.idm.common.types.ServiceAction;
import org.apache.syncope.core.logic.ChoreographyLogic;
import java.io.InputStream;
......@@ -30,28 +31,43 @@ public class ChoreographyServiceImpl extends AbstractServiceImpl implements Chor
private ChoreographyLogic logic;
@Override
public void enact(final String id, final InputStream in) {
logic.create(id, in);
public String enact(final String enactmentEngineKey, final InputStream chorSpec) {
return logic.enact(enactmentEngineKey, chorSpec);
}
@Override
public void update(final String id, final InputStream in) {
logic.update(id, in);
public void enact(final String id, final String enactmentEngineKey, final InputStream chorSpec) {
logic.enact(id, enactmentEngineKey, chorSpec);
}
@Override
public void delete(final String id) {
logic.delete(id);
public void delete(final String id, final String enactmentEngineKey) {
logic.delete(id, enactmentEngineKey);
}
@Override
public void onChoreography(final String id, final ChoreographyAction action) {
// Proxy invocation to EE
public void notifyCompletion(
final String id,
final ChoreographyOperation operation,
final String message,
final InputStream enactedChorSpec) {
logic.notifyCompletion(id, operation, message, enactedChorSpec);
}
@Override
public void onChoreographyService(final String id, final String serviceId, final ServiceAction action) {
// Proxy invocation to EE
public void onChoreography(final String id, final ChoreographyAction action, final Integer newSize) {
logic.onChoreography(id, action, newSize);
}
@Override
public void onChoreographyService(
final String id,
final String serviceId,
final ServiceAction action,
final String newServiceURL) {
logic.onChoreographyService(id, serviceId, action, newServiceURL);
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment