All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cds.feature.ucl.services.impl.UclServiceImpl Maven / Gradle / Ivy

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