package net.sourceforge.fenixedu.applicationTier.Servico.teacherServiceDistribution;

import net.sourceforge.fenixedu.applicationTier.Service;
import net.sourceforge.fenixedu.domain.teacherServiceDistribution.TeacherServiceDistribution;
import net.sourceforge.zas.metainfo.AccessControlled;

public class MergeTeacherServiceDistributions extends Service {

    @AccessControlled("DEPARTMENT_MEMBER || TEACHER || EMPLOYEE")
    public void run(Integer tsdId, Integer otherGroupingId) {

	TeacherServiceDistribution tsd = rootDomainObject.readTeacherServiceDistributionByOID(tsdId);
	TeacherServiceDistribution otherGrouping = rootDomainObject.readTeacherServiceDistributionByOID(otherGroupingId);

	tsd.mergeWithGrouping(otherGrouping);
    }
}
