com.sap.cds.feature.ucl.services.impl.UclServiceImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cds-feature-ucl Show documentation
Show all versions of cds-feature-ucl Show documentation
Unified Customer Landscape feature for CDS Services Java
The newest version!
package com.sap.cds.feature.ucl.services.impl;
import com.sap.cds.feature.ucl.services.AssignEventContext;
import com.sap.cds.feature.ucl.services.SpiiContext;
import com.sap.cds.feature.ucl.services.SpiiResult;
import com.sap.cds.feature.ucl.services.SpiiTenant;
import com.sap.cds.feature.ucl.services.UclService;
import com.sap.cds.feature.ucl.services.UnassignEventContext;
import com.sap.cds.services.ServiceDelegator;
public class UclServiceImpl extends ServiceDelegator implements UclService {
public UclServiceImpl(String name) {
super(name);
}
@Override
public SpiiResult assign(String tenantId, SpiiContext context, SpiiTenant receiverTenant, SpiiTenant assignedTenant) {
AssignEventContext ctx = AssignEventContext.create();
ctx.setTenant(tenantId);
ctx.setUclContext(context);
ctx.setUclAssignedTenant(assignedTenant);
ctx.setUclReceiverTenant(receiverTenant);
emit(ctx);
return ctx.getUclResult();
}
@Override
public void unassign(String tenantId, SpiiContext context, SpiiTenant receiverTenant, SpiiTenant assignedTenant) {
UnassignEventContext ctx = UnassignEventContext.create();
ctx.setTenant(tenantId);
ctx.setUclContext(context);
ctx.setUclAssignedTenant(assignedTenant);
ctx.setUclReceiverTenant(receiverTenant);
emit(ctx);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy