ContentRecord record = new ContentRecord( element, fromSlotID, content,
ContentRecord record = new ContentRecord( module, element, fromSlotID, content,
	private void doMove( DesignElement content, int fromSlotID,			DesignElement to, int toSlotID, int newPos )			throws ContentException	{		assert content != null;		assert to != null;		assert newPos >= -1;		// Do nothing if source and destination are the same.		if ( element == to && fromSlotID == toSlotID )			return;		// Cannot put an element inside itself.		if ( to.isContentOf( content ) )			throw new ContentException( to, fromSlotID, content,					ContentException.DESIGN_EXCEPTION_RECURSIVE );		// Ensure that the content can be put into the container.		if ( !element.getDefn( ).isContainer( ) )			throw new ContentException( element, fromSlotID,					ContentException.DESIGN_EXCEPTION_NOT_CONTAINER );		if ( !to.getDefn( ).isContainer( ) )			throw new ContentException( to, toSlotID,					ContentException.DESIGN_EXCEPTION_NOT_CONTAINER );		ContainerSlot fromSlot = element.getSlot( fromSlotID );		if ( fromSlot == null )			throw new ContentException( element, fromSlotID,					ContentException.DESIGN_EXCEPTION_SLOT_NOT_FOUND );		ContainerSlot toSlot = to.getSlot( toSlotID );		if ( toSlot == null )			throw new ContentException( to, toSlotID,					ContentException.DESIGN_EXCEPTION_SLOT_NOT_FOUND );		if ( !fromSlot.contains( content ) )			throw new ContentException( element, fromSlotID, content,					ContentException.DESIGN_EXCEPTION_CONTENT_NOT_FOUND );		if ( !fromSlot.canDrop( content ) )			throw new ContentException( element, fromSlotID,					ContentException.DESIGN_EXCEPTION_DROP_FORBIDDEN );		// if the content is in component slot of report design and it has		// children, then the operation is forbidden.		if ( hasDescendents( content, fromSlotID ) )		{			throw new ContentException( element, fromSlotID,					ContentException.DESIGN_EXCEPTION_HAS_DESCENDENTS );		}		SlotDefn slotInfo = (SlotDefn) to.getDefn( ).getSlot( toSlotID );		if ( !slotInfo.canContain( content ) )			throw new ContentException( to, toSlotID,					ContentException.DESIGN_EXCEPTION_WRONG_TYPE );		if ( !slotInfo.isMultipleCardinality( ) && toSlot.getCount( ) > 0 )			throw new ContentException( to, toSlotID,					ContentException.DESIGN_EXCEPTION_SLOT_IS_FULL );		if ( !to.canContain( module, toSlotID, content ) )			throw new ContentException(					to,					toSlotID,					content,					ContentException.DESIGN_EXCEPTION_INVALID_CONTEXT_CONTAINMENT );		ActivityStack stack = getActivityStack( );		String label = ModelMessages				.getMessage( MessageConstants.MOVE_ELEMENT_MESSAGE );		stack.startTrans( label );		ContentRecord record = new ContentRecord( element, fromSlotID, content,				false );		stack.execute( record );		record = new ContentRecord( to, toSlotID, content, newPos );		stack.execute( record );		stack.commit( );	}