package net.sourceforge.fenixedu.dataTransferObject.spaceManager; import java.io.Serializable; import net.sourceforge.fenixedu.domain.DomainReference; import net.sourceforge.fenixedu.domain.space.Space; import net.sourceforge.fenixedu.domain.space.SpaceState; public class MoveSpaceBean implements Serializable { private DomainReference selectedParentSpaceReference; private DomainReference spaceReference; private SpaceState spaceState; private String spaceName; public MoveSpaceBean() { } public MoveSpaceBean(Space thisSpace) { setSpace(thisSpace); setSpaceState(SpaceState.ACTIVE); } public MoveSpaceBean(Space fromSpace, Space destinationSpace) { setSpace(fromSpace); setSelectedParentSpace(destinationSpace); } public void setSelectedParentSpace(Space parentSpace) { this.selectedParentSpaceReference = (parentSpace != null) ? new DomainReference(parentSpace) : null; } public Space getSelectedParentSpace() { return (this.selectedParentSpaceReference != null) ? this.selectedParentSpaceReference.getObject() : null; } public void setSpace(Space thisSpace) { this.spaceReference = (thisSpace != null) ? new DomainReference(thisSpace) : null; } public Space getSpace() { return (this.spaceReference != null) ? this.spaceReference.getObject() : null; } public SpaceState getSpaceState() { return spaceState; } public void setSpaceState(SpaceState spaceState) { this.spaceState = spaceState; } public String getSpaceName() { return spaceName; } public void setSpaceName(String spaceName) { this.spaceName = spaceName; } }