package net.sourceforge.fenixedu.domain.organizationalStructure; import net.sourceforge.fenixedu.domain.exceptions.DomainException; import net.sourceforge.fenixedu.domain.space.Campus; import org.joda.time.YearMonthDay; import pt.iscte.ci.metadata.ISCTE; import pt.utl.ist.fenix.tools.util.i18n.MultiLanguageString; @ISCTE(author = "Paulo Zenida") public class CentralServiceUnit extends CentralServiceUnit_Base { public CentralServiceUnit() { super(); super.setType(PartyTypeEnum.CENTRAL_SERVICE); } public static Unit createNewCentralServiceUnit(MultiLanguageString name, Integer costCenterCode, String acronym, YearMonthDay beginDate, YearMonthDay endDate, Unit parentUnit, AccountabilityType accountabilityType, String webAddress, UnitClassification classification, Boolean canBeResponsibleOfSpaces, Campus campus) { CentralServiceUnit centralServiceUnit = new CentralServiceUnit(); centralServiceUnit.init(name, costCenterCode, acronym, beginDate, endDate, webAddress, classification, canBeResponsibleOfSpaces, campus); centralServiceUnit.addParentUnit(parentUnit, accountabilityType); return centralServiceUnit; } @Override public void setType(PartyTypeEnum partyTypeEnum) { throw new DomainException("unit.impossible.set.type"); } @Override public boolean isCentralServiceUnit() { return true; } }