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.utl.ist.fenix.tools.util.i18n.MultiLanguageString; public class ParticipatedInstitutionUnit extends ParticipatedInstitutionUnit_Base { public ParticipatedInstitutionUnit() { super(); super.setType(PartyTypeEnum.PARTICIPATED_INSTITUTION); } public static Unit createNewParticipatedInstitutionUnit(MultiLanguageString name, Integer costCenterCode, String acronym, YearMonthDay beginDate, YearMonthDay endDate, Unit parentUnit, AccountabilityType accountabilityType, String webAddress, UnitClassification classification, Boolean canBeResponsibleOfSpaces, Campus campus) { ParticipatedInstitutionUnit participatedInstitutionUnit = new ParticipatedInstitutionUnit(); participatedInstitutionUnit.init(name, costCenterCode, acronym, beginDate, endDate, webAddress, classification, canBeResponsibleOfSpaces, campus); participatedInstitutionUnit.addParentUnit(parentUnit, accountabilityType); return participatedInstitutionUnit; } @Override public void setType(PartyTypeEnum partyTypeEnum) { throw new DomainException("unit.impossible.set.type"); } @Override public boolean isParticipatedInstitutionUnit() { return true; } }